On Sat, 25 Oct 2008 07:56:53 -0400, Fast Primes wrote: > Hi, > > I'm very rusty. From a linux box, I want to run a program X.py after or > while setting it's list output to a file L.txt. How do I do that please?
I think this is a linux question more than python question. In Linux, it's easy to do stdin-stdout-stderr redirection. python script.py > output.txt If you're trying to redirect the output programmatically from inside the python program, instead of using the shell service for I/O redirection, do something like this: import sys sys.stdout = open('output.txt', 'w') _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor