Problems with Python CGI under Windows

Fredrik Lundh fredrik at pythonware.com
Mon Jul 1 10:42:02 EDT 2002


Domingo López López wrote:

> I am trying to read -from the standard input- a binary (JPEG) file
> in a Windows web server with a CGI. The problem is that python does
> not seem to support binary reading from standard input, because
> the reading stops when a 0x1A character (CTRL-Z) end of file arrives.

make sure you run the python interpreter with the -u
option; see e.g.

    http://starship.python.net/crew/davem/cgifaq/faqw.cgi?req=show&file=faq01.003.htp
    http://www.python.org/topics/web/windows.html

(googling for something like "python CGI windows" would have
told you this in a fraction of the time it took you to write your
message, of course... ;-)

</F>





More information about the Python-list mailing list