CGIHTTPServer

Marc Christiansen tolot at utolot.toppoint.de
Tue Oct 19 21:03:21 EDT 1999


Tres tseaver at starbase.neosoft.com wrote:
> In article <3807B4D0.127E7261 at prescod.net>,
> Paul Prescod  <paul at prescod.net> wrote:
>>I would appreciate a comment at the top of that program that says that
>>it doesn't run on Windows. Perhaps it could even test for os.fork at the
>>beginning and crash if it isn't installed.
> 
>   if sys.platform == 'win32' :
> 	raise "CGIServer won't run on Windows!"
> 
> should work fine.

I'd prefer

  if not hasattr(os,'fork'):
  	raise "CGIServer won't run on "+sys.platform

like Paul suggested, because there are more systems that don't have fork
(e.g. Amiga :-()

Marc
-- 
"Claims about the evils of cannabis have been exaggerated: The question now
 is not whether it should be legalised, but how and when."
                        http://www.newscientist.com/ns/980221/contents.html
PGP-Key fingerprint   EE 2E C1 06 D1 28 89 D2  F9 CE 35 7B F8 F4 42 52




More information about the Python-list mailing list