How to open a HTML file when the python cgi program is executing?

Ian Bicking ianb at colorstudy.com
Sat Jun 1 02:52:01 EDT 2002


Just do:

print open('main.html').read()

(making sure you print headers, like Content-type, first)

On Sat, 2002-06-01 at 01:43, Ken wrote:
> How do I open a HTML file when the cgi program is executing?
> 
> The only method I can think of, which doesn't work is this:
> <meta HTTP-EQUIV="REFRESH" CONTENT="0; URL=main.html">
> 
> 
> 
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 







More information about the Python-list mailing list