Doubt regarding exec function

M

Mosas

Dear All,
Php has exec function to run system commands and
this function return last line of system command
result. But in Python I can see only os.system()
function to run system command but it doesn't return
any result like php exec function.
I want to know about php equivalent exec function
in Python.
So If anyone know regarding this Kindly Mail me.
with regards
prabahar

________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony
 
D

Diez B. Roggisch

Mosas said:
Dear All,
Php has exec function to run system commands and
this function return last line of system command
result. But in Python I can see only os.system()
function to run system command but it doesn't return
any result like php exec function.
I want to know about php equivalent exec function
in Python.
So If anyone know regarding this Kindly Mail me.
with regards
prabahar

os.popen or the popen2 module are what you are looking for. In python2.4
there is also subprocess I believe.
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top