[wxPython-users] A Puzzle with PySimpleApp
Christopher Barker
Chris.Barker at noaa.gov
Wed Oct 3 10:18:39 PDT 2007
Peck, Jon wrote:
> The hosting app is a traditional Windows C++ app.
No GUI or mainloop?
> The odd thing is that in many cases running a program that creates
> and destroys the app repeatedly..
That is odd - but with a lot of this kin do of thing, something that is
not supported might work once in a while, if you're lucky.
> Leaving the app object around between programs and reusing it does not help.
OK -- I'd focus on this, as it should work. With some more detail, maybe
we can figure out what the problem is.
However, I'm a bit confused by what "between programs" means. It sounded
like you don't want to deal with IPC, so you must have only one program
running. Are you calling multiple python scripts, each of which needs to
pop up a dialog or something? if so, then that should work with one
running wxApp. In fact, I think you can have a wxApp without a mainloop
running, and still pop up dialogs, as they have their own mainloop.
One more note -- it is generally easier to have your main program by
Python, and call C/C++ stuff, than the other way around. Could you
re-structure to have a wxPython program as the host, and have your C/C++
routines called from there?
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the wxpython-users
mailing list