[python-win32] Python CGI problem

Mikael Engdahl mikael-l@engdahl.com
Wed, 04 Dec 2002 16:35:10 +0100


I'm having trouble setting up Python for CGI use on IIS. I think I have 
done the Application Extension Mapping right, mapping the extension .cgi 
to C:\Python22\python.exe -u -%s -%s. But when I try to view it I get 
this reply:

CGI Error
The specified CGI application misbehaved by not returning a complete set 
of HTTP headers. The headers it did return are:

Unknown option: -D
usage: C:\Python22\python.exe [option] ... [-c cmd | file | -] [arg] ...
Try `python -h' for more information.

It seems to me that IIS adds a -D option when executing python. Why? And 
how do I avoid this?


Mikael Engdahl