Web Development

Alex Martelli aleaxit at yahoo.com
Sat Oct 21 10:16:53 EDT 2000


"Steve Holden" <sholden at holdenweb.com> wrote in message
news:39CFB1FC.5B61AE14 at holdenweb.com...
    [snip]
> > According to the Python documentation, CGIHTTPServer uses os.fork() and
> > os.exec() which are available only on Unix.  I confess that I haven't
> > actually tried it yet. I guess I should.  Is the documentation
> > incorrect?
    [snip]
> Sounds like I'm mistaken :-(  Looks like code would be needed to detect
> the environment and use spawn() in Windows.  Sorry.

The docstrings and comments in the CGIHTTPServer with Python 2.0
clarify that the server DOES work on Windows (through, I think I
recall, popen2 rather than spawn), and on other environments too
if what you're executing is a Python script (it gets run in the same
process as the server if neither Unix nor Windows is the platform). A
vast progress from the situation on 1.5.2, where, in fact, CGIHTTPServer
was simply unusable on anything but a Unix-like platform; it now has
some utility on any platform!


Alex






More information about the Python-list mailing list