first commit

This commit is contained in:
vincent 2018-01-21 21:15:24 +01:00
commit f44d3a16ce

39
test.py Normal file
View File

@ -0,0 +1,39 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from tkinter import *
def click ():
print (value.get())
label2["text"]+=value.get()+"\r"
def click_reset ():
print ("exit")
fenetre.quit
label2["text"]=""
fenetre.mainloop
def check_channel(numero):
return {
'a': 1,
'b': 2
}.get(numero, "chaine inconnue")
fenetre = Tk()
value = StringVar()
value.set("texte par défaut")
entree = Entry(fenetre, textvariable=value, width=30)
frame =Frame(fenetre)
label = Label(fenetre, text="entrer text ")
label2=Label(fenetre, text="")
bouton=Button(frame, text="OK", command=click)
reset=Button(frame, text="reset",command=click_reset)
label.pack()
entree.pack()
frame.pack()
bouton.pack(side = LEFT)
reset.pack(side = RIGHT)
label2.pack()
fenetre.mainloop()