📜  python turtle 获取鼠标位置 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:46.589000             🧑  作者: Mango

代码示例1
canvas = turtle.getcanvas()
x, y = canvas.winfo_pointerx(), canvas.winfo_pointery()
# or
# x, y = canvas.winfo_pointerxy()