getMouse()

The GraphWin method that waits until the user clicks in the window and returns the click position as a Point.

In more detail

checkMouse is the non-waiting version: it returns the last click Point or None straight away, so an animation loop can keep running while watching for clicks. Waiting for a click before close gives the user time to see the result.

Example

p = win.getMouse()
print(p.getX(), p.getY())

Related terms

Taught in

References