Entry
Is there any way to shell out to a program and return whatever is printed to stdout rather than the exit status?
Nov 30th, 2004 10:27
Chris Burkhardt, Joe Bloggs, unknown unknown, Michael Hudson, Loren Poulsen,
import commands
print commands.__doc__
:-)
----------
Use os.popen() - RTFM. However, note that for Python 1.5.2 and before,
os.popen often doesnt work on Windows - you need my win32 extensions
for
this, where win32pipe.popen() does the right thing. os.popen should
reliably work on Windows in Python 2.0 and later.