title: Listening for global key-combinations in python on Linux
body: <p>I just wrote a little program which downloads a new wallpaper from flickr every few minutes.</p>
  
  <p>Now I want to add the capability to "like" a wallpaper, so it will occur more often than non-liked or disliked wallpapers.</p>
  
  <p>I'd like to assign a global keyboard-shortcut to this function.</p>
  
  <p>For example: If I press ctrl+7, it would execute some kind of "like" function in Python.</p>
  
  <p>Are there any libraries for this (in JavaScript for example there's a library where I can define shortcuts with <code>shortcut("ctrl-b", someFunction);</code>)</p>
  
  <p>Otherwise, how would I go round doing this? I've seen <a href="https://stackoverflow.com/questions/1901850/a-function-callback-every-time-a-key-is-pressed-regardless-of-which-window-has">this similar SO question</a>, but it's old.</p>