Python extension: callbacks blocked when holding button down

Discussion in 'Python' started by alan.chambers@cambridgeconsultants.com, Dec 12, 2008.

  1. Guest

    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
    , Dec 12, 2008
    #1
    1. Advertising

  2. Guest

    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 - - http://smontanaro.dyndns.org/
    , Dec 12, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Grant

    Session problem? not holding

    Grant, Aug 13, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    444
    Carl Prothman [MVP]
    Aug 14, 2003
  2. Jeffrey  Frabutt

    Listbox - multi-select without holding down ctrl- or shift-?

    Jeffrey Frabutt, May 6, 2005, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    868
    Jeffrey Frabutt
    May 7, 2005
  3. Weston C
    Replies:
    1
    Views:
    78
    Eric Bohlman
    Dec 26, 2003
  4. Replies:
    0
    Views:
    79
  5. Connor
    Replies:
    0
    Views:
    50
    Connor
    Feb 14, 2014
Loading...

Share This Page