CGI -- generating images -- \x0A always added!
M-a-S
NO-MAIL at hotmail.com
Wed Sep 10 03:25:33 EDT 2003
I'm very sorry. Of course it was my fault. I forgot import sys :) This code works. Thank you all!
sys.stdout.write( "Content-type: image/gif\n\n" )
sys.stdout.write( data )
sys.stdout.flush() # or close()
"M-a-S" <NO-MAIL at hotmail.com> wrote in message news:xJz7b.17514$ip5.1282848 at twister.southeast.rr.com...
> > >>> print "foo",;sys.stdout.softspace = 0
>
> This doesn't work. \x0A is added anyways. And from what I've read it shoudn't work -- it influences only the blank BEFORE each
print
> that doesn't go after NL.
>
> > sys.stdout.write( "Content-type: image/gif\n\n" )
> > sys.stdout.write( data )
> > sys.stdout.close() # or flush()
>
> Doesn't work at all. Server error. Premature end of script headers.
>
>
>
More information about the Python-list
mailing list