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