equivalent of PyQt4 processEvents for wxPython

520 views Asked by At

I'm working on PythonOCC, which is a terrific framework for the rapid prototyping of sophisticated CAD apps (it rocks!). PythonOCC comes with a viewer, that works both in wxPython and PyQt4 ( actually comes with x11 and a webgl viewer too... ).

Something incredibly useful in the PyQt4 version of the viewer that comes with PythonOCC is that while debugging is that while pdb.set_trace() is called, events are still processed due to QtGui.QApplication.processEvents() goodness. That makes a world of different when you're working on geometry and still are able to navigate in the viewer. What I'd love to know is how I can mimic this behaviour in wxPython? This would make a world of difference for me.

1

There are 1 answers

0
Mike Driscoll On

According to the wxWidgets' wiki, you can use the App object's Yield command to flush the event queue: http://wiki.wxwidgets.org/Custom_Events. You might be able to do it with Update or Refresh, but I'm not really sure. Here's some event documentation too:

You might want to cross-post to the wxPython mailing list too. The creator of wxPython hangs out there and I'm sure he'll know for sure.