#fermeture des fenetres
def quitte():
pygame.quit()
fenetre.destroy()
#fenetre principale
fenetre=Tk()
fenetre.title("regulateur de trafic")
fenetre.geometry("1024x768")
entre_part=Label(fenetre,text="Maintenant %s essaye de faire mieux!!"%(entre))
entre_part.grid(row=1,column=0)
#fenetre controle chrono
fenbouton=Frame(fenetre,bd=2,relief=RIDGE)
fenbouton.grid(row=2,column=0)
Label(fenbouton,text="controle du chrono").grid()
Button(fenbouton,text="ChronoX10",bg="light blue",command=acc).grid(row=1)
Button(fenbouton,text="Reset",bg="light blue",command=reset_chrono).grid(row=1,column=1)
Button(fenbouton,text="Marche",bg="orange",command=marche_chrono).grid(row=2,column=0)
Button(fenbouton,text="Arret",bg="orange",command=stop_chrono).grid(row=2,column=1)
#fentre affichage du chrono
fentemp=Frame(fenetre,bd=2,relief=RIDGE)
fentemp.grid(row=2,column=1)
temp=Label(fentemp,font=('sans',30,'bold'),text="Chronometre",bg='white',fg="purple")
temp.grid()
dhorloge=Label(fentemp)
dhorloge.grid(row=1,column=0)
fhorloge=Label(fentemp)
fhorloge.grid(row=2,column=0)
rhorloge=Label(fentemp)
rhorloge.grid(row=3,column=0)
#fenetre affichage des sequences programme
feneven=Frame(fenetre,bd=2,relief=RIDGE)
feneven.grid(row=3,column=1)
niv=Label(feneven,text="Choisit ta sequence max=%s!"%(n))
niv.grid()
entre1=Entry(feneven)
entre1.bind("<Return>",niveau_sequence)
entre1.grid(row=1,column=0)
entre_seq=Label(feneven,font=("sans",20,"bold"),text="Sequences:%s"%(n),fg="blue")
entre_seq.grid(row=2)
even=Label(feneven)
even.grid(row=3,column=0)
evaluer=Label(feneven)
evaluer.grid(row=4,column=0)
Button(feneven,text="Valider",bg="green",command=sequences).grid(row=5,column=0,sticky=W)
#Button(feneven,text="Stop",bg="red",command=fin_horloge).grid(row=5,column=1)
#fenetre affichage image
fenimage=Canvas(fenetre,width=640,height=480,bd=2,relief=RIDGE)
photo=PhotoImage(file=cliche)
fenimage.create_image(320,240,image=photo)
fenimage.grid(row=3,column=0)