On Nov 1, 9:52 am, bluegray <[EMAIL PROTECTED]> wrote:
> 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.

Do you have the "shebang" listed at the top of your code (i.e. #!/path/
to/python)? Are you importing the cgi module at the top of your code?

>From what I've read, you don't need to modify the htaccess file...

See also:

Tutorials:
http://www.cs.virginia.edu/~lab2q/
http://wiki.python.org/moin/CgiScripts
http://www.upriss.org.uk/python/PythonCourse.html

Docs:
http://www.python.org/doc/essays/ppt/sd99east/index.htm
http://docs.python.org/lib/module-cgi.html

Mike

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to