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

Sebastian Bassi sbassi at clubdelarazon.org
Sat Mar 17 23:48:58 EDT 2007


On 17 Mar 2007 17:28:56 -0700, yinglcs at gmail.com <yinglcs at gmail.com> wrote:
> 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()  ?

Maybe you mean to parse the output of the program you run using
os.system. If this is the case, you should redirect the putput of the
program to a file (with ">") and then parse that file.

Best,
SB.



More information about the Python-list mailing list