mouse input in turtle module

Brian Blais bblais at
Wed Feb 3 23:57:55 CET 2010


I would like to find a way to pause, and get mouse input in the  
turtle module.  Since it is built on tk, I thought perhaps there  
would be an easy way, but I am stumped.  Specifically, I'd like  
something like:

x,y,button=mouse_input() # pause in here until the mouse is clicked  
in the turtle window

I know about the screenclick, where I can define a callback but I  
couldn't rig it to pause until a mouse clicked, even using global  
flags.  Is there an example of this somewhere?  For a bonus, I'd love  
to be able to <esc> out of it, either raising an exception or return  
a button=-1 or something.


		Brian Blais

Brian Blais
bblais at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list