[PythonCE] Any way to get the webserver classes working?
Dan Samblanet
dan@bloodylikely.com
Mon, 28 Apr 2003 20:10:01 -0400
Maybe this has been covered in the past, but I sure can't easily find
it. Due to my laziness, I have decided to go with a web based interface
instead of mucking around with win32 for an app I am developing.
Everything so far works fine on the PC Side. When I bring it over to my
PPC I get the following error:
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 1068)
Traceback (most recent call last):
File "/Program Files/Python/lib\SocketServer.py", line 221, in
handle_request
self.process_request(request, client_address)
File "/Program Files/Python/lib\SocketServer.py", line 240, in
process_request
self.finish_request(request, client_address)
File "/Program Files/Python/lib\SocketServer.py", line 253, in
finish_request
self.RequestHandlerClass(request, client_address, self)
File "/Program Files/Python/lib\SocketServer.py", line 513, in __init__
self.setup()
File "/Program Files/Python/lib\SocketServer.py", line 553, in setup
self.rfile = self.connection.makefile('rb', self.rbufsize)
AttributeError: '_socket.socket' object has no attribute 'makefile'
----------------------------------------
The code: (currently, just like the documented example)
import CGIHTTPServer
import BaseHTTPServer
def run(server_class=BaseHTTPServer.HTTPServer,
handler_class=CGIHTTPServer.CGIHTTPRequestHandler):
server_address = ('', 8000)
httpd = server_class(server_address, handler_class)
httpd.serve_forever()
run()
My current setup is:
PythonCE 2.3 (
http://mail.python.org/pipermail/pythonce/2002-September/000140.html )
on top of the lib dir from the PPC Python R2 (However I do get the same
error without 2.3).
If there are any solutions or workarounds to this issue, I would
appreciate hearing them.
Thanks
-Dan