Sleep Program Until Keypress
Question: I have the following code

    
    
    #!/usr/bin/python
    import keybinder
    
    def Mark(args):
        print "Why, hello!"
    
    keybinder.bind("<Super>m", Mark, "junk")
    KEYBINDER.MAIN_LOOP_KEYPRESS()
    

In other words, I would like to make a program which sleeps silently in the
background until a key combination is pressed anywhere in the system.
Keybinder seems like a good way of getting the keypress, but I'm not sure how
to do the sleeping part implied by the final line. It seems as though
importing a large framework like GTk would be overkill for this application
and I'd prefer to avoid a busy loop.

Any thoughts?


Answer: Maybe just:

    
    
    while not key_pressed:
        time.sleep(0.2)
    

