Reading stdout and stderr of an external program

2007-07-02 Thread Murali
Hi Python programmers, I need to be able to read the stdout and stderr streams of an external program that I launch from my python script. os.system( 'my_prog' + ' err.log' ) and was planning on monitoring err.log and to display its contents. Is this the best way to do this? Thanks, Murali. --

Re: Reading stdout and stderr of an external program

2007-07-02 Thread Thomas Jollans
On Monday 02 July 2007, Murali wrote: Hi Python programmers, I need to be able to read the stdout and stderr streams of an external program that I launch from my python script. os.system( 'my_prog' + ' err.log' ) and was planning on monitoring err.log and to display its contents. Is this the

Re: Reading stdout and stderr of an external program

2007-07-02 Thread Ben Cartwright
I need to be able to read the stdout and stderr streams of an external program that I launch from my python script. os.system( 'my_prog' + ' err.log' ) and was planning on monitoring err.log and to display its contents. Is this the best way to do this? from subprocess import Popen stdout,