Python extension: callbacks blocked when holding button down
skip at pobox.com
skip at pobox.com
Fri Dec 12 14:04:43 EST 2008
alan> I'm developing a Python extension. It's a wrapper for some
alan> firmware, and simulates the target hardware environment. I'm using
alan> wxPython. I pass a function to the extension so it can let Python
alan> know about certain events. The code is currently single threaded.
alan> My problem is that the callback seems to have no effect if it is
alan> called while I am holding down a wxButton in the Python GUI. Long
alan> button presses are significant in the firmware so this seems a bit
alan> limiting.
alan> Can anyone explain what is going on? What's the best workaround?
You don't say what platform you're running on, but in many environments,
holding down a menu button "grabs" the window server for the duration of the
button press. This is certainly the case on Unix running the X Window
System. In many cases multithreading is the best way around this problem.
--
Skip Montanaro - skip at pobox.com - http://smontanaro.dyndns.org/
More information about the Python-list
mailing list