Find the cursor's current position in Python turtle
问题 How can I find the current mouse position in Python that can be integrated into turtle? I would prefer if you did not use any non-builtin modules (downloadable modules) Any answers would be appreciated 回答1: We can reach down into turtle's Tk underpinnings to enable the '<Motion>' event. I cast the function to set/unset the event to look like a method of the turtle screen but you can call it on the singular screen instance turtle.Screen() : import turtle def onmove(self, fun, add=None): """