Python extension: callbacks blocked when holding button down

A

alan.chambers

I'm developing a Python extension. It's a wrapper for some firmware,
and simulates the target hardware environment. I'm using wxPython. I
pass a function to the extension so it can let Python know about
certain events.
The code is currently single threaded.

My problem is that the callback seems to have no effect if it is
called while I am holding down a wxButton in the Python GUI. Long
button presses are significant in the firmware so this seems a bit
limiting.

Can anyone explain what is going on? What's the best workaround?

Thanks.


Al
 
S

skip

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top