Re: re-posting: web.py, incomplete
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: re-posting: web.py, incomplete

From: Magnus Lycka <lycka@carmen.se>
Date: Fri Mar 03 2006 - 19:13:38 CET

Dennis Lee Bieber wrote:
> On 3 Mar 2006 04:01:44 -0800, "_wolf" <wolfgang.lipp@gmail.com>
> 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.
Received on Sun Apr 30 10:45:50 2006