Doubt regarding exec function

Discussion in 'Python' started by Mosas, Mar 22, 2005.

  1. Mosas

    Mosas Guest

    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
    Mosas, Mar 22, 2005
    #1
    1. Advertising

  2. 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
    Diez B. Roggisch, Mar 22, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hal Vaughan
    Replies:
    11
    Views:
    1,107
    Gordon Beaton
    May 22, 2006
  2. praba kar

    doubt regarding main function

    praba kar, Apr 7, 2005, in forum: Python
    Replies:
    0
    Views:
    317
    praba kar
    Apr 7, 2005
  3. felix
    Replies:
    5
    Views:
    241
    felix
    Mar 20, 2007
  4. Replies:
    1
    Views:
    311
    Ian Collins
    Apr 23, 2007
  5. kumarve

    doubt regarding isprint() function!!!

    kumarve, Feb 27, 2008, in forum: C Programming
    Replies:
    0
    Views:
    273
    kumarve
    Feb 27, 2008
Loading...

Share This Page