serving html from a python script in IE

bluegray bluegraydragon at gmail.com
Thu Nov 1 10:52:19 EDT 2007


I'm writing a script that outputs html. It works fine in Firefox,
however, IE wants to download the file instead of displaying the
output. I keep getting the file download dialog instead of the html
page.

I am doing something like this:

print 'Content-Type: text/html ; charset=utf-8\nCache-Control: no-cache
\n'
print '<html><body>some text and html</body></html>'

I also tried various things in .htaccess which has the following line:

AddHandler cgi-script .py

Any help will be appreciated.




More information about the Python-list mailing list