If I call
os.popen('foo').read()
I want to capture
sh: foo: not found
as well.
I don't have the subprocess
module since this is a minimal install on an embedded system.
popen3,4 doesn't work either:
File "/usr/lib/python2.7/os.py", line 667, in popen3
import subprocess
ImportError: No module named subprocess
I suppose I could do
os.popen(command + " 2>&1").read()
to pipe it to stdout, but ideally I'd want to get it separately.