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

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,799
Latest member
Mercury_Dev

Latest Threads

Top