[mod_python] python print

Gre7g Luterman gre7g-k-modpython.e475ec at wolfhome.com
Mon Jun 9 13:41:00 EST 2003

On 9 Jun 2003 at 11:39, tpc at csua.berkeley.edu wrote:


> although 'return' seems to exit after the first character.

You have two options, one is assemble all the text you want to output 
in a single variable:

A = "one"
A += "two"
A += "three"
return A

or use the write statement:


I think you may even be allowed to:

print >> req, "one"
print >> req, "two"
print >> req, "three"

Which is very similar to using the write statement.


Gre7g Luterman   gre7g at wolfhome.com  http://www.templeofluna.com/
Stay informed: http://www.templeofluna.com/keeper/mailinglist.htm
                      Into each wound, a little salt must fall...

More information about the Mod_python mailing list