-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGUI.py
More file actions
executable file
·48 lines (40 loc) · 1.08 KB
/
Copy pathGUI.py
File metadata and controls
executable file
·48 lines (40 loc) · 1.08 KB
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
44
45
46
47
48
from tkinter import *
#corpo do programa
janela = Tk()
janela.title("Destruir.exe")
janela.geometry('300x200+0+0')
#--
#definições
#definição da ação que o botão1 vai fazer ao ser pressionado
def botao_pressionado():
import imp
pasta_digitada = e1.get()
imp.destruir_pasta(pasta_digitada)
def botao2_pressionado():
exit()
#--
#botão
#botão1 = ação
#especificações do botão1, coordenadas, texto e ação
b1 = Button(janela, text="DESTRUIR", command = botao_pressionado)
b1.place(x=110, y=80)
#botão2 = sair
#sai do programa
b2 = Button(janela, text="SAIR", command = botao2_pressionado)
b2.pack(anchor = W)
b2.place(x=130, y=110)
#--
#campo de escrita/entrada de informação
#usuário fornece a informação
e1 = Entry(janela)
e1.pack(side=TOP)
e1.place(x=50, y=50)
#--
#texto
#"instruções"
#Label(janela,text='Caminho da Pasta :', font=fonte1,width=8).pack(side=LEFT)
#e1 = e1.label(janela, text="Hello Tkinter!")
Label(janela,text='Cole o Caminho da Pasta abaixo :').place(x=40, y=20)
#Label.place(x=50, y=20)
#--
janela.mainloop()