Hi,

A question about Xlib Library in Python troubled me for several days and I 
finally found this email list. I hope someone could answer my question. I think 
it is easy for experienced user.


I would like to write a small script to response my mouse click in root screen 
and write something in the terminal. My script is like this, but it does not 
work in my computer.


from Xlib import X
import Xlib.display


def main():
    display = Xlib.display.Display()
    root = display.screen().root
    root.change_attributes(event_mask=
                        X.ButtonPressMask |
                        X.ButtonReleaseMask)
    while True:
        event = root.display.next_event()
        print "1"
if __name__ == "__main__":
    main()





Any hints are welcome
Thank you!


Ruan zheng
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to