python cgi script not understood as html
Mitja Trampus
nun at example.com
Mon Oct 24 16:11:13 EDT 2005
Philippe C. Martin wrote:
> Hi,
>
> The following code outputs the actual HTML text to the browser, not the
> interpreted text.
>
> Any idea ?
>
> html_ok = """
> Content-Type: text/html\n
> <html>
> ...
> """
Avoid the starting newline (before content-type).
Add at least TWO newlines after content-type.
Or use a package to handle the HTTP stuff for you.
More information about the Python-list
mailing list