How to unbuffer Python's output

David Stanek dstanek at dstanek.com
Tue Jul 14 19:03:02 EDT 2009


2009/7/14 Lily Gao <Lily.Gao at autodesk.com>:
> Hi, All
>
> I am calling a python program in perl and use redirection,
>
> Like :
>
> `python x.py > 1.log 2>&1`

Try tihs instead:
    python x.py 2>&1 > 1.log

-- 
David
blog: http://www.traceback.org
twitter: http://twitter.com/dstanek



More information about the Python-list mailing list