[wxPython-users] two application objects,
conflicting window names
Josiah Carlson
jcarlson at uci.edu
Tue Aug 8 09:21:43 PDT 2006
Christian Kristukat <ckkart at hoc.net> wrote:
>
> Hi,
> I'm trying to implement the very common behaviour of an application which clones
> itself upon opening a new, let's say project. So I created a new app obkect an
> run it main loop. This works, however there seem to be window name clashes
> between the two instances. The gui is created from xrc and I defined quite some
> xml window ids. Is there a way to avoid the name conflicts and still use xml
> window ids?
Some applications will open new windows, but very few actually literally
clone themselves. If you actually want to replicate literally
everything that your app is doing, you can use any one of the process
starting mechanisms to spawn a new instance of your application (you take
command-line arguments, right?)
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.
- Josiah
More information about the wxpython-users
mailing list