Help me to catch this exception :-)

Mardy mardy at
Thu Nov 24 17:46:14 CET 2005

Le die Thu, 24 Nov 2005 07:09:26 -0800, Fuzzyman ha scribite:

> I don't know the answer, but I like the problem. :-)
> What happens with the standard CGIHttpServer ?

The standard CGIHttpServer uses fork() on Unix and popen() on Windows;
since both these functions run the module in a separate process, the
problem doesn't show up. But on Mac, it uses execfile(), so I guess the
problem is the same.

For the moment, I've come up with a hybrid solution: in
CGIHTTPServer, doing "import cgitb; cgitb.enable()" before the try block
which calls execfile(), and add an empty except clause which prints the


There's still something not working perfectly, but I think this is close
to the solution.


More information about the Python-list mailing list