Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Running external programs: what is the best way?

Reply
Thread Tools

Running external programs: what is the best way?

 
 
sir_alex
Guest
Posts: n/a
 
      01-02-2006
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?

 
Reply With Quote
 
 
 
 
Peter Hansen
Guest
Posts: n/a
 
      01-02-2006
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

 
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
Create references to external scipt files from within an external script file Mellow Crow Javascript 6 11-04-2005 01:16 PM
Running External Programs through ASP.NET =?Utf-8?B?TWF0dA==?= ASP .Net 2 05-13-2005 01:08 PM
unresolved external symbol/using an external dll Scott Allen C++ 8 05-02-2004 06:11 PM
Running External App Possible? Gene Ariani ASP .Net 0 01-15-2004 05:18 AM
Running External Applications in ASP.NET Edward ASP .Net 2 11-13-2003 03:18 PM



Advertisments