How to do this in Python?

Hu, Bizhong c-Bizhong.Hu at mci.com
Wed Nov 17 15:46:29 EST 2004


Hi,

 

I just started using python. In Perl, I could do something like this to
process the output of ps:

$result = `ps -ef | grep myprog`. Then the $result contains the result from
this command line.

How can I do similar things in python?

 

Thanks.

 

Bizhong Hu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20041117/6e72ef16/attachment.html>


More information about the Python-list mailing list