Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as text by x ( 17 years ago )
###### comment next line for run like spected.
import pyatspi
import threading

class thr(threading.Thread):
    def run(self):
        def cb(eve):
            print eve
        import pyatspi
        pyatspi.Registry.registerEventListener(cb, 'focus')
        import gobject
        gobject.timeout_add(4500, pyatspi.Registry.stop)
        pyatspi.Registry.start()

t = thr()
t.start()
t.join(7000)
print 'joined correctly'

 

Revise this Paste

Your Name: Code Language: