SCGIServer and unusal termination

Eden Kirin eden at bicikl.
Tue Nov 17 11:32:58 EST 2009


Diez B. Roggisch wrote:

>> Is there some reasonable explanation for this behaviour? Thanks in
>> advance.
> 
> I can only guess that SCGIServer does something to stdout. Your code isn't
> executed twice, so the doubling seems to come from writing it twice.

Yes I know that code isn't executed twice since the value of n remains 
the same, only print lines are doubled.

> Try e.g. redirecting stdout and stderr to different files, and see if things
> appear once in both.

Redirection of stdout:

eden at sunce:~/data/project/ScgiServer/test> python test.py 1> output.txt
^Ceden at sunce:~/data/project/ScgiServer/test> cat output.txt
Starting server.
Exception!
Terminating server, attempt 1.
Check n: 2.
Starting server.
Exception!
Terminating server, attempt 1.
Check n: 2.

Redirecting stderr creates an empty file. I still haven't found the 
solution.

-- 
www.vikendi.net -/- www.supergrupa.com



More information about the Python-list mailing list