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