How to parse the os.system() output in python

Dave Reed dave256 at mac.com
Sat Mar 17 21:52:33 EDT 2007


On Mar 17, 2007, at 8:28 PM, yinglcs at gmail.com wrote:

> Hi,
>
> I use os.system() to execute a system command in python.
> Can you please tell me how can I parse (in python) the output of the
> os.system()  ?
>
> Thank you.


Sounds like you want os.popen, not os.system.

http://docs.python.org/lib/module-popen2.html

Dave




More information about the Python-list mailing list