Python cgi script - outputting images

Mexican Bandit eli-wallach at ugly.com
Sun Jul 1 17:06:50 EDT 2001


>windows has separate "text mode" and "binary mode". text mode
>means windows does some translation when you write to a file.
>this breaks for binary data. stdout also happens to be in
>text mode by default. you need to run python with the -u command
>line option to get stdout in binary mode.

Thanks, problem solved.

I tried the same little script in Perl and had the same problem. But
the Perl documentation does mention this text/binary mode problem when
serving up images on Windows.

Regards



More information about the Python-list mailing list