# Créé par alexanor, le 04/01/2017 en Python 3.2 # Créé par alexanor, le 04/01/2017 en Python 3.2 from tkinter import * from time import * def date(): global heure if Ok==0: heure.set(round((time()-h),1)) f.after(100,date) def commencer(): global Ok,h h=time() Ok=0 date() def arret(): global Ok Ok=1 heure.set(0) def quitter(): f.destroy() f=Tk() heure=StringVar() h=time() heure.set(0) Ok=1 l=Label(f,textvariable=heure) l.pack() b = Button(f,text='commencer',command=commencer) b.pack() c = Button(f,text='arrêter',command=arret) c.pack() d = Button(f,text='quitter',command=quitter) d.pack() f.mainloop()