with "http://localhost/index.html" does nothing,
with "http://localhost:81/index.html ", [note: port 81 used instead of port 80, port 80 was already in use], gave:
>>>
started httpserver...
michaeleric-PC - - [29/May/2011 15:42:25] "GET /index.html HTTP/1.1" 200 -
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 51159)
Traceback (most recent call last):
File "C:\Python31\lib\socketserver.py", line 281, in _handle_request_noblock
self.process_request(request, client_address)
File "C:\Python31\lib\socketserver.py", line 307, in process_request
self.finish_request(request, client_address)
File "C:\Python31\lib\socketserver.py", line 320, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\Python31\lib\socketserver.py", line 614, in __init__
self.handle()
File "C:\Python31\lib\http\server.py", line 352, in handle
self.handle_one_request()
File "C:\Python31\lib\http\server.py", line 346, in handle_one_request
method()
File "C:\Users\MySelf\Program\game_stuff\Python_Server_code_and_test\pythonweb\webserver.py", line 20, in do_GET
self.wfile.write(f.read())
File "C:\Python31\lib\socket.py", line 219, in write
return self._sock.send(b)
TypeError: must be bytes or buffer, not str
----------------------------------------
^C received, shutting down server
>>>
Bookmarks