Advertisement
joanmarie

simple listener

Oct 18th, 2011
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3. import pyatspi
  4.  
  5. def listener(e):
  6.     # Figure out the accessible name of the offending
  7.     # app you're filing the bug about and replace 'foo'
  8.     # with that name. Then uncomment out the next two lines.
  9.     #if e.host_application.name != 'foo':
  10.     #    return
  11.     print e
  12.  
  13. pyatspi.Registry.registerEventListener(listener, 'object:state-changed', 'focus:')
  14. pyatspi.Registry.start()
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement