########## Importer les modules necessaires ############## from tkinter import * ########################################################## ########## Fonctions ################################## ########################################################## def fctDroite(ev=None): [a,b,c,d] = Canevas.coords(image) Canevas.coords(image,a+50,b,c+50,d) ########################################################## ########## Variables ################################## ########################################################## ######################################################### ########## Interface graphique ########################## ########################################################## Mafenetre = Tk() Mafenetre.title("Titre") Canevas = Canvas(Mafenetre,width=1000,height=1000,bg ='white') Canevas.pack() image=Canevas.create_oval(10,460,40,490,fill='red') ########################################################### ########### Receptionnaire d'évènement #################### ########################################################### Canevas.bind_all('<d>',fctDroite) ########################################################## ############# Programme principal ######################## ########################################################## ###################### FIN ############################### Mafenetre.mainloop()