'print' in a CGI app.

Timo Virkkala wt at nic.fi
Sun Aug 3 15:01:01 EDT 2003


Andrew Chalk wrote:
> In a Python 2.2 app. running under CGI the statements
> 
> print "Hello\n"
> print "World"
> 
> print both words on the same line in IE6. How do I print the second one on a
> new line (i.e. respect the \n in the first statement).

How about (untested):

print "Hello<BR>\n"
print "World"

...since, AFAIK, it should be HTML that CGI's output...?

-- 
Timo Virkkala | wt at nic.fi

   "In the battle between you and the world, bet on the world."





More information about the Python-list mailing list