Python Trouble getting cursor position (x, y) on desktop
<p>I've been looking for ways to find my cursor position and put it on to two variables, x and y. But most answers are outdated and i can't seem to make them work. I would rather if it is in pythons standard librarys or pywinauto. I would also prefer in python 2.7. Thanks.</p>

<p>You can do this with <a href="https://pypi.python.org/pypi/PyMouse" rel="nofollow">PyMouse</a>.</p>

<pre><code>&gt;&gt;&gt; import pymouse;
&gt;&gt;&gt; mouse = pymouse.PyMouse()
&gt;&gt;&gt; mouse.position()
(288.046875, 396.15625)
&gt;&gt;&gt; mouse.position()
(0.0, 0.0)
&gt;&gt;&gt; mouse.position()
(1439.99609375, 861.2890625)
</code></pre>

python windows-7 cursor-position pywinauto