简体   繁体   中英

equivalent of PyQt4 processEvents for wxPython

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM