Running external programs: what is the best way?

Discussion in 'Python' started by sir_alex, Jan 2, 2006.

  1. sir_alex

    sir_alex Guest

    If i have to execute an external program (for example, in the frontend
    that i created for convert, from ImageMagick) i have 2 possibilities: i
    can call one function between the exec* family, or i can call the
    system function: so, which in your opinion is the best? The only
    difference that i know (but i may be in error) between these 2
    functions is that the former doesn't return (so you have to create a
    child process), but the latter returns. Is this the only difference?
     
    sir_alex, Jan 2, 2006
    #1
    1. Advertising

  2. sir_alex

    Peter Hansen Guest

    sir_alex wrote:
    > If i have to execute an external program (for example, in the frontend
    > that i created for convert, from ImageMagick) i have 2 possibilities: i
    > can call one function between the exec* family, or i can call the
    > system function: so, which in your opinion is the best? The only
    > difference that i know (but i may be in error) between these 2
    > functions is that the former doesn't return (so you have to create a
    > child process), but the latter returns. Is this the only difference?


    Those are options. So is the newer subprocess module, which I believe
    is considered to be a reason to deprecate almost all other ways of doing
    the same thing (os.system, possibly excluded, because of it's sheer
    simplicity).

    -Peter
     
    Peter Hansen, Jan 2, 2006
    #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. =?Utf-8?B?TWF0dA==?=

    Running External Programs through ASP.NET

    =?Utf-8?B?TWF0dA==?=, May 5, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    4,324
    =?Utf-8?B?TWF0dA==?=
    May 13, 2005
  2. Replies:
    12
    Views:
    1,702
    Dave Thompson
    Jan 10, 2005
  3. Bob=Moore
    Replies:
    10
    Views:
    2,821
  4. lone_eagle
    Replies:
    3
    Views:
    670
    psykeedelik
    May 26, 2009
  5. Sol Linderstein
    Replies:
    2
    Views:
    176
    A. Sinan Unur
    Jun 1, 2004
Loading...

Share This Page