Capturing output from stderr

Doru-Catalin Togea doru-cat at
Mon Dec 5 14:15:22 CET 2005


On solaris, I call a program from python with

 	os.system("some command > outputFile.txt" )

This redirects the output of "some command"'s stdout to "outputFile.txt". 
However I need to redirect or somehow capture the output from "some 
command"'s stderr to this file too. How can I do that?


More information about the Python-list mailing list