[wxPython-users] Re: two application objects,
conflicting window names
Josiah Carlson
jcarlson at uci.edu
Tue Aug 8 22:04:55 PDT 2006
Christian Kristukat <ckkart at hoc.net> wrote:
>
> Josiah Carlson <jcarlson <at> uci.edu> writes:
>
> >
> > On Windows, you can use os.system('start "" <command line>') (be careful
> > with argument quoting...). On other platforms, you may be able to
> > os.fork(), though I've never tried it with wxPython applications. May
> > be an interesting experience.
>
> Thanks for your ideas. I tried with os.spawn and it works very well on linux (I
> haven't yet tried on windows):
>
> os.spawnl(os.P_NOWAIT, sys.argv[0], sys.argv[0], arg1, arg2, ...)
One trick with os.spawn* is that the process created will be a child
process of the creating process. If you close the parent process,
depending on your platform, it may close down the child processes (it
does on Windows).
On Windows, using os.system('start "" <command line>') does not create a
child process, so isn't subject to the parent closing issue.
I had suggested os.fork() on non-Windows platforms because it also
doesn't suffer the parent/child process issue.
- Josiah
More information about the wxpython-users
mailing list