Re: SimpleHTTPServer

"Luke Dunstan" <[email protected]>
Newsgroups gmane.comp.python.windows-ce
Message-ID <[email protected]>
----- Original Message ----- 
From: "Belyaev Dmitry" <[email protected]>
To: <[email protected]>
Sent: Tuesday, August 01, 2006 2:40 AM
Subject: [PythonCE] SimpleHTTPServer


>I tried to write simple http server on my PDA.
> ------------------------------
> import SimpleHTTPServer as Handler
> import BaseHTTPServer as Server
>
> h = Handler.SimpleHTTPRequestHandler
> s = Server.HTTPServer(('localhost', 80), h)
> s.serve_forever()

The above works fine for me on Pocket PC 2003 with PythonCE 2.4.3. Is your 
OS or Python version different? I did use Pocket Internet Explorer.

Luke

> ------------------------------
> It works on Desktop, but failes on PDA with the following error:
> ------------------------------
> Exception happened during processing of request from ('127.0.0.1', 1026)
> Traceback (most recent call last):
>   File "binaries\lib\SocketServer.py", line 222, in handle_request
>   File "binaries\lib\SocketServer.py", line 241, in process_request
>   File "binaries\lib\SocketServer.py", line 254, in finish_request
>   File "binaries\lib\SocketServer.py", line 521, in __init__
>   File "binaries\lib\BaseHTTPServer.py", line 316, in handle
>   File "binaries\lib\BaseHTTPServer.py", line 299, in handle_one_request
>   File "binaries\lib\socket.py", line 340, in readline
> error: (10054, 'Connection reset by peer')
> ------------------------------
> Is it error in Internet Explorer CE or in PythonCE?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.