(no subject)

Gerhard Häring gerhard at bigfoot.de
Wed Jun 12 10:52:11 EDT 2002


In article <m37kl8b4tp.fsf at mira.informatik.hu-berlin.de>, Martin v. Loewis wrote:
> [cgi programming with Python]
> There are several strategies, but I recommend to use plain print
> statements.

I would recommend to write to a StringIO.StringIO instance for the http body
instead, then, at the end, when you finally know that nothing exceptional
happened, you know which HTTP header to write, and then just print the body.

Gerhard
-- 
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id 86AB43C0
public key fingerprint: DEC1 1D02 5743 1159 CD20  A4B6 7B22 6575 86AB 43C0
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))



More information about the Python-list mailing list