Return to Snippet

Revision: 17384
at September 2, 2009 16:05 by simlan

Updated Code
from Xlib import X, display
d = display.Display().screen().root.query_pointer()._data

print "x="
print d["root_x"]
print "y="
print d["root_y"]

Revision: 17383
at September 2, 2009 15:58 by simlan

Initial Code
from Xlib import X, display
d = display.Display()
s = d.screen()
root = s.root
print "x="
print b["root_x"]
print "y="
print b["root_y"]
#d.sync() Not necessary

Initial URL

Initial Description
Quick and dirty took me 2hours to find. The Xlib Documentation sucks. Have Fun\r\n\r\nnote: U need the Xlib -(Ubuntu)-> sudo apt-get install python-xlib

Initial Title
Mouseposition on Linux via Xlib

Initial Tags

Initial Language