python实现实时获取鼠标坐标,pyautogui模块

import pyautogui
try:
    while True:
        x, y = pyautogui.position()
        print(x,y)
except KeyboardInterrupt:
    print('\nExit.')

 

你可能感兴趣的:(python)