
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
Como extrair chaves TOTP 2FA a partir de QRCODE (Google Authenticator)
Linux em 2025: Segurança prática para o usuário
Desktop Linux em alta: novos apps, distros e privacidade marcam o sábado
IA chega ao desktop e impulsiona produtividade no mundo Linux
Novos apps de produtividade, avanços em IA e distros em ebulição agitam o universo Linux
Como instalar o repositório do DBeaver no Ubuntu
Como instalar o Plex Media Server no Ubuntu
Digitando underscore com "shift" + "barra de espaços"
Como ativar a lixeira e recuperar aquivos deletados em um servidor Linux
Como mudar o nome de dispositivos Bluetooth via linha de comando
É normal não gostar de KDE? (9)
Linux é a solução para o fim do Windows10? (2)
Problemas com Driver NVIDIA (4)









