python get position of mouse code example Example: py get mouse coordinates import pyautogui pos = pyautogui.position()