Replace calls to xprop by python Xlib