Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.python
Re: python scripts with IIS
Rolf van de Krol
1/19/2008 3:34:00 PM
Adding the following lines before your print statement should do the
trick. IIS complains about the headers, so adding headers should help.
print "Content-Type: text/html" # HTML is following
print # blank line, end of headers
william paul wrote:
>
> Hello:
>
> I am trying to configure IIS to work with Python scripts:
>
> I've added in the Home Directory/Configuration the .py extention and
> the path to the python.exe as: c:\Python24\python.exe %S %S
> The python script has 1 line:
> print "This is a test for python scripts with IIS"
>
> When I launch the file using IE I get the message:
>
> *CGI Error*
> The specified CGI application misbehaved by not returning a complete
> set of HTTP headers. The headers it did return are:
>
> This is a test for python scripts with IIS
>
> How can I remove the CGI error?
>
> Thank you
>
> William
>
> ------------------------------------------------------------------------
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try
> it now.
> <
http://us.rd.yahoo.com/...
*
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9t...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: python scripts with IIS
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password