Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Doubt regarding exec function

Reply
Thread Tools

Doubt regarding exec function

 
 
Mosas
Guest
Posts: n/a
 
      03-22-2005
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
 
Reply With Quote
 
 
 
 
Diez B. Roggisch
Guest
Posts: n/a
 
      03-22-2005
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
doubt regarding isprint() function!!! kumarve C Programming 0 02-27-2008 02:02 PM
doubt regarding mmap() function call sam_cit@yahoo.co.in C Programming 1 04-23-2007 08:10 AM
doubt regarding return value of a function felix C Programming 5 03-20-2007 04:28 AM
doubt about doubt Bob Nelson C Programming 11 07-30-2006 08:17 PM
doubt regarding main function praba kar Python 0 04-07-2005 11:38 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57