sys.stdout linebuffered
Michael Hudson
mwh at python.net
Wed May 26 15:07:56 EDT 2004
"Thomas Guettler" <guettli at thomas-guettler.de> writes:
> Hi,
>
> I start a long running script like this (unix):
>
> nohup foo.py > foo.log &
>
> Now Python thinks sys.stdout should not be
> line buffered. How can I force linebuffering?
>
> I want to see the log file while the script is
> still running.
>
> I don't like this solution (Wrapping sys.stdout
> with an own class)
>
> http://groups.google.de/groups?hl=de&lr=&ie=UTF-8&selm=u4rz0icqq.fsf%40ctwd0143.fitlinxx.com
Why? It appears to solve your problem!
Cheers,
mwh
--
I think if we have the choice, I'd rather we didn't explicitly put
flaws in the reST syntax for the sole purpose of not insulting the
almighty. -- /will on the doc-sig
More information about the Python-list
mailing list