Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Programmation Python
Les fondamentaux
Voir le programme détaillé
Module « turtle » Python 3.13.2

Fonction ondrag - module turtle

Signature de la fonction ondrag

def ondrag(fun, btn=1, add=None) 

Description

help(turtle.ondrag)

Bind fun to mouse-move event on this turtle on canvas.

Arguments:
fun -- a function with two arguments, to which will be assigned
       the coordinates of the clicked point on the canvas.
btn -- number of the mouse-button defaults to 1 (left mouse button).

Every sequence of mouse-move-events on a turtle is preceded by a
mouse-click event on that 

Example:
>>> ondrag(goto)

Subsequently clicking and dragging a Turtle will move it
across the screen thereby producing handdrawings (if pen is
down).


Vous êtes un professionnel et vous avez besoin d'une formation ? RAG (Retrieval-Augmented Generation)
et Fine Tuning d'un LLM
Voir le programme détaillé