(self, item, fun, num=1, add=None)
Bind fun to mouse-move-event (with pressed mouse button) on turtle.
        fun must be a function with two arguments, the coordinates of the
        actual mouse position on the canvas.
        num, the number of the mouse-button defaults to 1

        Every sequence of mouse-move-events on a turtle is preceded by a
        mouse-click event on that turtle.
Bind fun to mouse-move-event (with pressed mouse button) on turtle.
        fun must be a function with two arguments, the coordinates of the
        actual mouse position on the canvas.
        num, the number of the mouse-button defaults to 1
Bind fun to mouse - move - event ( with pressed mouse button ) on turtle . fun must be a function with two arguments the coordinates of the actual mouse position on the canvas . num the number of the mouse - button defaults to 1
def _ondrag(self, item, fun, num=1, add=None):
        """Bind fun to mouse-move-event (with pressed mouse button) on turtle.
        fun must be a function with two arguments, the coordinates of the
        actual mouse position on the canvas.
        num, the number of the mouse-button defaults to 1

        Every sequence of mouse-move-events on a turtle is preceded by a
        mouse-click event on that turtle.
        """
        if fun is None:
            self.cv.tag_unbind(item, "<Button%s-Motion>" % num)
        else:
            def eventfun(event):
                try:
                    x, y = (self.cv.canvasx(event.x)/self.xscale,
                           -self.cv.canvasy(event.y)/self.yscale)
                    fun(x, y)
                except Exception:
                    pass
            self.cv.tag_bind(item, "<Button%s-Motion>" % num, eventfun, add)
def _ondrag ( self , item , fun , num = 1 , add = None ) : if fun is None : self . cv . tag_unbind ( item , "<Button%s-Motion>" % num ) else : def eventfun ( event ) : try : x , y = ( self . cv . canvasx ( event . x ) / self . xscale , - self . cv . canvasy ( event . y ) / self . yscale ) fun ( x , y ) except Exception : pass self . cv . tag_bind ( item , "<Button%s-Motion>" % num , eventfun , add )