Getting a process's output

Dietrich Epp dietrich at zdome.net
Mon Jan 19 17:04:52 EST 2004


Is there any easy way to get all the output of a process?  Ideally, the 
function takes parameters like exec(), calls fork(), wait()s for the 
process to complete, and returns the process's stdout, stderr, and exit 
status.  By stdout and stderr I don't mean file objects or 
descriptors... I mean strings containing the entire output.

I would try to do it myself, but I'm not sure how to interleave the 
operations.





More information about the Python-list mailing list