Starting application inside an application

David Allen s2mdalle at titan.vcu.edu
Thu Jan 11 14:52:12 EST 2001


In article <3A5D7722.2977BFE0 at proceryon.at>, "Horst Gassner"
<horst at proceryon.at> wrote:

> Hello!
> 
> Platform: Linux
> 
> What is the easiest way to launch a new application from e.g. a menu in a
> running application? Using os.system() does not work because the calling
> application has to wait until the launched application has terminated.
> 
> What I want to do is simply starting a second instance of my application
> (just like starting the application from the command line a second
> time). I am looking for a function like spawnv() which unfortunately only
> works for the windows platform.
> 
> Thank you Horst

You can popen() a process. You pass the command line
to popen() and it returns a file object which you
can then use as normal.  

Or, you can do what popen() is really doing, only
do it yourself.  Popen just forks a process, and 
exec's a shell to execute your command line.

-- 
David Allen
http://opop.nols.com/
----------------------------------------
"The number of UNIX installations has grown to 10, with more expected."
-- The UNIX Programmer's Manual, 2nd Edition, June, 1972



More information about the Python-list mailing list