Redirecting Output from a Long Running Python app

Neilen nmarais at hertz.ee.sun.ac.za
Thu Oct 31 08:31:41 EST 2002


Hi.

I wrote some numeric code in python (using numpy, etc.), that often needs
to run for a while.  Therefore I wanted to use nohup, to ensure it does
not get accidentally killed if I close an xterm or something similar.
The only problem is, no output seems to be redirected to nohup.out, nor
is anything printed to the terminal.  My program is quite verbose, and
I would have liked to tail -f nohup.out, to see how its doing.

I created the output of my program just using standard print statements.
Intermingled, are some outputs of the date program.  I used this to print
the time now and again, before I read up on the os module ;)  Anyhow,
when python's output is redirected, (using nohup, or just plain >) that
is all I see in the output!

Initially I thaught this was some oddity due to running on IRIX (6.5.13),
with Python 2.1.3 I compiled, but the same happes with the latest debian
packaging of Python 2.1.3.

Any suggestions?

Thanks
Neilen



More information about the Python-list mailing list