os.system stdout redirection...

Terry Gray tgray at cox-internet.com
Sun Aug 17 02:01:41 EDT 2003


Using Python 2.2 in Debian linuxI am trying to change to a different 
directory, execute a 'make all' command, and redirect the output of the 
subshell to a PyQt window...  I should be able to execute the 
os.system('cd newdirectory; make all'), but how do I redirect stdout of 
the new subshell created by the os.system call?

Any help would be appreciated.

twgray





More information about the Python-list mailing list