wxPython TextCtrl not working inside of Panda main loop

I have a panda window inside of a wxPython frame, and I’m using panda to run the wxPython main loop.

The issue I have now is that I can’t type into the text control I have in that window.

    def __init__(self): 

    def replaceEventLoop(self): 
        self.evtLoop = wx.EventLoop() 
        self.oldLoop = wx.EventLoop.GetActive() 
        taskMgr.add(self.wxStep, "evtLoopTask") 
    def wxStep(self, task=None): 
        while self.evtLoop.Pending(): 
        if task != None: return task.cont 

As I understand it, Panda is running the wx loop, which is fine, but I bet that panda’s not letting wx gain keyboard control. Can I tell panda to stop grabbing keyboard inputs based on the wxWindow’s focus?

Here’s the whole code for some more context if needed: http://code.google.com/p/excavation/source/browse/src/tools/collide.py#215

I can type in it.
What’s your OS ?

Interesting Ubuntu 11.04.

What are you running?


The code I posted in another threadmay help. I am successfully using that code snippet as the base for the Panda/wx interaction in my program. There haven’t been any issues from the start to now, with over 7500 lines and counting written around it. Cheers

Edit: I am using all sorts of wxPython controls, including the TextCtrl.

Thanks, that looks very promising, and may solve a few issues I wasn’t aware of yet.


It looks to some weird issue with Ubuntu and compiz. If I tab out of my app and come back I can type fine.