Writing an image

Alex Martelli aleax at aleax.it
Fri Nov 7 17:34:29 CET 2003


Michael Hudson wrote:

> "Mr. Costington" <noahd at juno.no.spam.com> writes:
> 
>> Hi all, I was trying to hava a CGI script return an image, but it was
   ...
> sys.stdout is not usually a binary-mode file.

Right; one can change that with the -u switch to python (e.g., starting
the cgi script with
    #!c:\python23\python.exe -u
if one's webserver recognizes and applies hashbang conventions).


Alex





More information about the Python-list mailing list