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
Servidor de Backup com Ubuntu Server 24.04 LTS, RAID e Duplicati (Dell PowerEdge T420)
Visualizar câmeras IP ONVIF no Linux sem necessidade de instalar aplicativos
Atualizar Debian Online de uma Versão para outra
Dica para encontrar diversos jogos Indies criativos
Instalando Discord no Debian 13
Instalar driver Nvidia no Debian 13
Redimensionando, espelhando, convertendo e rotacionando imagens com script
Software livre - será que eu estou tão errado assim? (17)
Dificuldade com Ocs 2.12.3 no Debian 13 com Apache2 - Can't load ... (4)
paginação dos favoritos não funciona no vivaolinux[BU... (4)