You could use PyMouse. To get the screen size just use the screen_size()
attribute:
from pymouse import PyMouse
m = PyMouse()
a = m.screen_size()
a
will return a tuple, (X, Y)
, where X
is the horizontal position and Y
is the vertical position.
Link to function in documentation.