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

Y

yinglcs

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.
 
D

Dennis Lee Bieber

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() ?
With os.system()? You don't.

Read the library reference manual (or for older Pythons, download
and install the module/docs) on the subprocess module.
--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/
 
S

Sebastian Bassi

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top