Windows ME, CGIHTTPServer & pain...

Sloth mt_horeb at yahoo.com
Sat May 26 23:48:19 EDT 2001


I'm putting a little app together that (in theory) will run a simple
CGI capable server on  Windows 98 and Windows ME laptops.  The server,
which conveniently uses CGIHTTPServer, looks like this:

from CGIHTTPServer import CGIHTTPRequestHandler
import BaseHTTPServer

httpd = BaseHTTPServer.HTTPServer(("", 8001), CGIHTTPRequestHandler)
print "Serving at port 8001"
httpd.serve_forever()

Below the working directory is a '/cgi-bin' directory.  When I ran
this script on a WinNT Workstation, everything worked as one would
expect, and the server allowed me to link to and call CGI scripts
(*.py) from cgi-bin.  But, alas, there is now a major problem...

While testing the above server on a Windows ME laptop, the server (or
Windows) does not allow CGI scripts to run.  The server allows HTML to
be served up quite nicely.  However, linking to a CGI script causes
Windows to beep at me and causes the browser to basically hang.  The
page stays where it is, the IE logo spins around, but I never go to my
CGI script!  The console shows that Windows has called
C:\Python20\Python.exe on my script, but it won't go anywhere!!!  Even
more ridiculous is the fact that the script really clobbers the rest
of the laptop, usually leading to the death of Explorer.

Does anyone know how to get Win98/ME to play nicely with the
*HTTPServer modules?  I realize that I could download
Apache/mod_python, but I would rather use the built-in modules, since
this app will never be networked.

To summarize:
WindowsNT + CGIHTTPServer = CGI is served up!
WindowsME + CGIHTTPServer = BOOM

Thanks in advance!  

Sloth



More information about the Python-list mailing list