spawn and standard output

DelPiccolo Ivano ivano.delpiccolo at degroof.be
Thu Feb 14 03:30:19 EST 2002


You can also redirect your command to a specific file and read it.
example :
os.system("ls -la>foo.txt")
after you open the file foo.txt and you read it.

The problem of using that method, stdout and stdin are in the same file.
When you read your file you have to do treatment to detect if the
information is coming from stdout or stderr.


"Nigel Moriarty" <nw_moriarty at yahoo.com> wrote in message
news:ce0b6758.0202131543.1707e80c at posting.google.com...
> Hi all,
>
> When I spawn a process from a python script on MSW, the standard
> output doesn't go to the terminal where I started the script.  I would
> like to view this output for debugging.  Where does the output go and
> how can I view it?  Do I need to use popen or can I redirect to a
> file?  Any other suggestions?
>
> Nigel





More information about the Python-list mailing list