Starting application inside an application

Donn Cave donn at u.washington.edu
Thu Jan 11 15:40:40 EST 2001


Quoth Horst Gassner <horst at proceryon.at>:
| 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.

On the contrary, I bet os.spawnv() will work fine for you.

   >>> import os
   >>> os.spawnv(os.P_NOWAIT, '/usr/bin/uname', ('uname', '-s'))
   1445
   >>> FreeBSD

   >>>

Check it out.

	Donn Cave, donn at u.washington.edu



More information about the Python-list mailing list