excuse me :) i know this somewhat disscussion was still on the past few years
way back 2010 can i still ask about something? :) what syntax or coding will i
use if i wanted to do multiple strokes of the mouse?
because the [turtle.ondrag(turtle.goto)] that you have suggested have really
helped
On Nov 13, 2010, at 1:31 AM, Dennis Lee Bieber wrote:
On Fri, 12 Nov 2010 20:48:34 -0500, Brian Blais bbl...@bryant.edu
declaimed the following in gmane.comp.python.general:
turtle.ondrag(turtle.goto)
turtle.pendown()
I'm not familiar with the turtle module but... would it make
On Nov 12, 2010, at 8:48 PM, Brian Blais wrote:
On Nov 12, 2010, at 8:05 PM, Steven D'Aprano wrote:
On Fri, 12 Nov 2010 19:24:50 -0500, Brian Blais wrote:
I'd like to draw on a turtle canvas, but use the mouse to direct the
turtle. I don't see a good way of getting the mouse
On Sat, 13 Nov 2010 06:22:59 -0500, Brian Blais wrote:
there is no change by changing the order, but I didn't expect one.
since ondrag is binding a callback, which is only called when the event
happens, I figure that the pen has to be down when the callback happens,
not when the binding
On Sat, 13 Nov 2010 09:10:41 -0500, Brian Blais wrote:
Here is code that works, with at least one small oddity:
import turtle
def gothere(event):
turtle.penup()
turtle.goto(event.x-360,340-event.y)
turtle.pendown()
def movearound(event):
I'd like to draw on a turtle canvas, but use the mouse to direct the turtle. I
don't see a good way of getting the mouse coordinates and the button state. I
tried to do something like this:
import turtle
def gothere(event):
print event.x
print event.y
turtle.goto(event.x,event.y)
On Fri, 12 Nov 2010 19:24:50 -0500, Brian Blais wrote:
I'd like to draw on a turtle canvas, but use the mouse to direct the
turtle. I don't see a good way of getting the mouse coordinates and the
button state.
I think the right way to do that is by creating an event handler to the
turtle.
On Nov 12, 2010, at 8:05 PM, Steven D'Aprano wrote:
On Fri, 12 Nov 2010 19:24:50 -0500, Brian Blais wrote:
I'd like to draw on a turtle canvas, but use the mouse to direct the
turtle. I don't see a good way of getting the mouse coordinates and the
button state.
I think the right way to