you can’t imagine how happy I am having this one finally solved. I proudly present wxPython and Panda3D running in separate Processes with proper resizing, cleanup on closing, and mouse- and keyboard focus.
By running both the GUI and Panda3D in separate processes you gain multiple advantages:
- Multicore support
- Framerate independence
(slow game won’t make GUI freeze)
- Code encapsulation
(especially comes handy when it comes to Panda’s builtins magic)
- Crash safety (When Panda crashes because of Python exceptions, the GUI is still running and you could e.g. stop Panda and show a nice debugging dialog)
The only disadvantage is that you have to use a pipe for communication between Panda and wx. That said, if you want Panda to react to a button in wx you have to put a request into the pipe from wx, read it through a task in Panda and call appropriate action there. I can provice an example if anybody’s interested.
EDIT: up to date code on gist.github.com/3586720