By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,929 Members | 634 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,929 IT Pros & Developers. It's quick & easy.

Doubt regarding exec function

P: n/a
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
Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Mosas wrote:
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.

--
Regards,

Diez B. Roggisch
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.