
Enviado em 21/08/2020 - 08:41h
Fala pessoal tudo bem ?from tkinter import *
import subprocess
# Creating a variable to identify a window
root = Tk()
class Funcs():
def clear(self):
self.first_arg_entry.delete(0, END)
self.second_arg_entry.delete(0, END)
def start(self):
print ("Tool started in terminal")
subprocess.call('python tool.py', shell=True)
class Application(Funcs):
def __init__(self):
self.root = root
self.window()
self.frames_window()
self.widgets_frame1()
# Creating Loop
root.mainloop()
def window(self):
self.root.title("Interface 1.1")
self.root.configure(background= '#1e3743')
self.root.geometry("700x600")
self.root.resizable(True, True)
self.root.maxsize(width=800, height=700)
self.root.minsize(width=500, height=300)
def frames_window(self):
self.frame_1 = Frame(self.root, bd=4, bg= '#dfe3ee', highlightbackground= '#759fe6', highlightthickness=2)
self.frame_1.place(relx=0.02, rely=0.02, relwidth=0.96, relheight=0.46)
#self.frame_1.place(x=50, y=50, width=100, height=100)
#self.frame_1.pack(side="top")
self.frame_2 = Frame(self.root, bd=4, bg='#dfe3ee', highlightbackground= '#759fe6', highlightthickness=2)
self.frame_2.place(relx=0.02, rely=0.5, relwidth=0.96, relheight=0.46)
def widgets_frame1(self):
### Creating Button Start
self.bt_start = Button(self.frame_1, text= 'Start',
bg = '#2aa349', fg = 'white', font= ("verdana", 10, "bold"), bd=4, command= self.start)
self.bt_start.place(relx=0.20, rely=0.08, relwidth=0.1, relheight=0.14)
### Creating Button Clear
self.bt_clear = Button(self.frame_1, text='Clear' , bg = '#107db2',
fg = 'white', command= self.clear)
self.bt_clear.place(relx=0.72, rely=0.08, relwidth=0.1, relheight=0.14)
## Creating Label and Entry to --first-arg
self.lb_first_arg = Label(self.frame_1, text = "--first-arg", bg= '#dfe3ee', fg = '#107db2')
self.lb_first_arg.place(relx= 0.05, rely= 0.35 )
self.first_arg_entry = Entry(self.frame_1 )
self.first_arg_entry.place(relx= 0.05, rely= 0.45, relwidth= 0.9)
## Creating Label and Entry to --second=arg
self.lb_second_arg = Label(self.frame_1, text = "--second-arg", bg= '#dfe3ee', fg = '#107db2')
self.lb_second_arg.place(relx= 0.05, rely= 0.55 )
self.second_arg_entry = Entry(self.frame_1 )
self.second_arg_entry.place(relx= 0.05, rely= 0.65, relwidth= 0.12)
Application()
python tool.py --first-arg pedro julio silvia claudio simone --second-arg 20
Papagaiando o XFCE com temas e recursos
WhatsApp com Chamadas no Linux via Waydroid
XFCE - quase um Gnome ou Plasma mas muito mais leve
LXQT - funcional para máquinas pererecas e usuários menos exigentes
Centralizar Logo com Transparência via ImageMagick
Removendo entradas de boot UEFI "fantasmas" via terminal
Atualizações de Segurança Automáticas no Debian
Como cortar as partes de um vídeo com passagens de áudio em branco
Alguém tem que acabar com ANATEL!!! (3)
Uma pergunta bem simples mas não achei resposta (ainda) [RESOLVIDO] (2)
Tentativa de instalar Linux em um notebook HP 246 G6 (2)









