How to set up web service by python?

Peng Yu pengyu.ut at gmail.com
Sat Oct 24 21:13:47 CEST 2009


I'm following the instruction on
http://fragments.turtlemeat.com/pythonwebserver.php to set web
service. But I get the following error message when I run the script
on my mac machine. I'm wondering why I see the permission denied error
message.

$python webserver.py
Traceback (most recent call last):
  File "webserver.py", line 63, in <module>
    main()
  File "webserver.py", line 55, in main
    server = HTTPServer(('', 80), MyHandler)
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/SocketServer.py",
line 330, in __init__
    self.server_bind()
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/BaseHTTPServer.py",
line 101, in server_bind
    SocketServer.TCPServer.server_bind(self)
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/SocketServer.py",
line 341, in server_bind
    self.socket.bind(self.server_address)
  File "<string>", line 1, in bind
socket.error: (13, 'Permission denied')



More information about the Python-list mailing list