re-posting:, incomplete

Magnus Lycka lycka at
Fri Mar 3 19:13:38 CET 2006

Dennis Lee Bieber wrote:
> On 3 Mar 2006 04:01:44 -0800, "_wolf" <wolfgang.lipp at>
> declaimed the following in comp.lang.python:
>>it does look like it, no?

No, it looks the other way around: You have buffered output,
and parts of your stdout never gets flushed. -u is not a
problem, it's the normal fix for this.

>> but i don't---at least i think i don't. in my
>>httpd conf it says
>>``AddHandler cgi-script .py``, and at the top of my script,
>>``#!/usr/local/bin/python``. standard, no ``-u`` here.
> 	That may be part of the problem -- partial buffer not being
> written...
> 	Have you tried a flush operation on stdout?

Just change the first line to ``#!/usr/local/bin/python -u``.
You don't want buffered output in CGI apps.

More information about the Python-list mailing list