-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tkinter.py
47 lines (30 loc) · 871 Bytes
/
Tkinter.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
from tkinter import *
def nettoyage():
valeur = value.get().upper()
val1 = valeur.split("\B\T")
val2 = val1[1].split("\T")
val3 = val2[1].split("\\N")
val4 = val2[0]
val5= val3[0]
destination1.set(val4)
destination2.set(val5)
fenetre = Tk()
source = Label(fenetre, text='Source : ')
source.pack()
value = StringVar()
value.set("")
entree = Entry(fenetre, textvariable=value, width=30)
entree.pack()
bouton_clean = Button(fenetre, text='CLEAN', command=nettoyage)
bouton_clean.pack()
champ_label = Label(fenetre, text='Déstination ')
champ_label.pack()
destination1 = StringVar()
destination1.set("")
entree1 = Entry(fenetre, textvariable=destination1, width=20)
entree1.pack()
destination2 = StringVar()
destination2.set("")
entree2 = Entry(fenetre, textvariable=destination2, width=20)
entree2.pack()
fenetre.mainloop()