Sem resumo de edição |
Sem resumo de edição |
||
| Linha 1: | Linha 1: | ||
<syntaxhighlight lang="py"> | <syntaxhighlight lang="py"> | ||
26/06/2017 - 13:55 | |||
from tkinter import * | |||
from functools import partial | |||
from tkinter import ttk | |||
#JANELA | |||
#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ | |||
janela = Tk() | |||
janela.geometry("300x300+200+200") | |||
janela.title("Think About Eat!") | |||
janela["bg"] = "#eeddff" | |||
#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ | |||
#FRAME DE FAZER O LOGIN | |||
#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ | |||
def tenho_rest(): | |||
home.destroy() | |||
login = Frame() | |||
login["bg"] = "#eeddff" | |||
usuario = Label(login, text = "Usuário: ", bg = "#eeddff") | |||
usuario.pack(fill = BOTH) | |||
us = Entry(login) | |||
us.pack() | |||
senha = Label(login, text = "Senha: ", bg = "#eeddff") | |||
senha.pack() | |||
se = Entry(login, show = '*') | |||
se.pack() | |||
#-------------Valida a senha | |||
def valido(): | |||
user = us.get() | |||
password = se.get() | |||
arquivo = open('senhas.txt', 'r') | |||
texto = arquivo.readlines() | |||
arquivo.close() | |||
k = 0 | |||
for linha in texto: | |||
lista = linha.split() | |||
if lista[0] == user: | |||
k = 1; | |||
if lista[1] == password: | |||
login.destroy() | |||
us.destroy() | |||
se.destroy() | |||
meu_rest(lista[2]) | |||
else: | |||
errou = Label(login, text = "Ahh, não! Algo está errado!", bg = "#d1fce1") | |||
errou.pack() | |||
if k == 0: | |||
errou = Label(login, text = "Ahh, não! Algo está errado!", bg = "#d1fce1") | |||
errou.pack() | |||
finish = Button(login, text = "Pronto!", font = "Calibri 10 bold", bg = "#4f8c56", fg = "white", relief = "flat", command = valido) | |||
finish.pack() | |||
login.pack() | |||
#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ | |||
#FRAME DO DONO DO RESTAURANTE | |||
#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ | |||
def meu_rest(nome_rest): | |||
rest = Frame() | |||
rest["bg"] = "#eeddff" | |||
nome = Label(rest, text = nome_rest, font = ("Helvetica Neue 95 Black", 16), bg = "#eeddff") | |||
nome.pack() | |||
tabela = ttk.Treeview(rest, selectmode = 'browse', show = 'headings' , height = 7) | |||
arquivo = open('dado.txt', 'r') | |||
texto = arquivo.readlines() | |||
arquivo.close() | |||
g = -1 | |||
for linha in texto: | |||
lista = linha.split() | |||
if len(lista) and lista[0] == nome_rest: | |||
g+=1 | |||
if g != -1: | |||
g+=1 | |||
if g == 2: | |||
i = 0 | |||
lista = linha.split() | |||
while i < len(lista): | |||
tabela.insert("", 'end', text = "L1", values = (lista[i], lista[i+1])) | |||
i+=2 | |||
elif g == 3: | |||
i = 0 | |||
lista = linha.split() | |||
while i < len(lista): | |||
tabela.insert("", 'end', text = "L1", values = (lista[i], lista[i+1])) | |||
i+=2 | |||
elif g == 4: | |||
i = 0 | |||
lista = linha.split() | |||
while i < len(lista): | |||
tabela.insert("", 'end', text = "L1", values = (lista[i], lista[i+1])) | |||
i+=2 | |||
elif g == 5: | |||
i = 0 | |||
lista = linha.split() | |||
while i < len(lista): | |||
tabela.insert("", 'end', text = "L1", values = (lista[i], lista[i+1])) | |||
i+=2 | |||
g = -1 | |||
break | |||
#------------------------ Tabela de produtos | |||
tabela.pack() | |||
tabela["columns"] = ("1", "2") | |||
tabela['show'] = 'headings' | |||
tabela.column("1", width=150, anchor='c') | |||
tabela.column("2", width=150, anchor='c') | |||
tabela.heading("1", text="Nome") | |||
tabela.heading("2", text="Preço") | |||
#------------------------------------- | |||
#------------------------Função para deletar o restaurante | |||
def delete_rest(): | |||
j1 = Tk() | |||
j1.geometry("250x250+300+150") | |||
j1.title("Validação") | |||
tit = Label(j1, text="Digite sua senha:") | |||
tit.pack() | |||
sen = Entry(j1, show = '*') | |||
sen.pack() | |||
#Valido a senha | |||
def valido(): | |||
senha = sen.get() | |||
arquivo = open('senhas.txt', 'r') | |||
texto = arquivo.readlines() | |||
arquivo.close() | |||
for linha in texto: | |||
lista = linha.split() | |||
if len(lista) and lista[2] == nome_rest: | |||
if lista[1] == senha: | |||
deleta() | |||
else: | |||
errou = Label(j1, text = "Ahh, não! Algo está errado!") | |||
errou.pack() | |||
def deleta(): | |||
#Deleto do arquivo de restaurantes | |||
arquivo = open('dado.txt', 'r') | |||
texto = arquivo.readlines() | |||
arquivo.close() | |||
arquivo = open('dado.txt', 'w') | |||
k = -2; | |||
for linha in texto: | |||
lista = linha.split() | |||
if len(lista) and lista[0] == nome_rest: | |||
k = -1 | |||
if k != -2: | |||
k+=1 | |||
if k == -1: | |||
arquivo.writelines(linha) | |||
if k == 4: | |||
k = -1 | |||
arquivo.close() | |||
#Deleto do arquivo de logins | |||
arquivo = open('senhas.txt', 'r') | |||
texto = arquivo.readlines() | |||
arquivo.close() | |||
arquivo = open('senhas.txt', 'w') | |||
k = -2; | |||
for linha in texto: | |||
lista = linha.split() | |||
if lista[2] != nome_rest: | |||
arquivo.writelines(linha) | |||
arquivo.close() | |||
j1.destroy() | |||
janela.destroy() | |||
ok = Button(j1, compound = "left", bg = "#54d863", text = "Ok", font = "Calibri 11", relief = "flat", command = valido) | |||
ok.pack() | |||
#------------------------------------------------------- | |||
#------------------------Função para adicionar algo no cardápio | |||
def add_card(): | |||
add = Tk() | |||
add.geometry("250x250+300+150") | |||
add.title("Adicionar produto") | |||
nome = nome_rest | |||
tip = Label(add, text="Tipo do produto:") | |||
tip.pack() | |||
ex = Label(add, text="(entrada, principal, sobremesa ou bebida)", font = ("Calibri 11", 6)) | |||
ex.pack() | |||
t = Entry(add) | |||
t.pack() | |||
nom = Label(add, text="Nome:") | |||
nom.pack() | |||
n = Entry(add) | |||
n.pack() | |||
prec = Label(add, text="Preço:") | |||
prec.pack() | |||
ex1 = Label(add, text="Ex: R$2,00", font = ("Calibri 11", 6)) | |||
ex1.pack() | |||
p = Entry(add) | |||
p.pack() | |||
# Adiciona | |||
def valide(): | |||
tipo = t.get() | |||
novo = n.get() | |||
preco = p.get() | |||
arquivo = open('dado.txt', 'r') | |||
texto = arquivo.readlines() | |||
arquivo.close() | |||
#--------------------- Verifico se já existe | |||
h = 0 | |||
g = -1 | |||
y = -1 | |||
b = 0 | |||
x = 0 | |||
for linha in texto: | |||
lista = linha.split() | |||
if len(lista) and lista[0] == nome: | |||
y += 1 | |||
if tipo == 'entrada': | |||
b = 1 | |||
elif tipo == 'principal': | |||
b = 2 | |||
elif tipo == 'sobremesa': | |||
b = 3 | |||
elif tipo == 'bebida': | |||
b = 4 | |||
else: | |||
break | |||
elif y != -1: | |||
y += 1 | |||
if b == y: | |||
for i in lista: | |||
if i == novo: | |||
x = 1 | |||
nao = Label(add, text = "Produto já existente.", font = ("Calibri 11", 8)) | |||
nao.pack() | |||
break | |||
#----------------------- Se nao existir, crio | |||
if x == 0: | |||
arquivo = open('dado.txt', 'w') | |||
for linha in texto: | |||
lista = linha.split() | |||
if len(lista) and lista[0] == nome: | |||
g = 0 | |||
if tipo == 'entrada': | |||
h = 1 | |||
elif tipo == 'principal': | |||
h = 2 | |||
elif tipo == 'sobremesa': | |||
h = 3 | |||
elif tipo == 'bebida': | |||
h = 4 | |||
else: | |||
nao = Label(add, text = "Tipo de produto inválido.", font = ("Calibri 11", 8)) | |||
nao.pack() | |||
if g != -1 and h != 0: | |||
g+=1 | |||
if g == h: | |||
k = len(linha) | |||
linha += novo | |||
linha += ' ' | |||
linha += preco | |||
linha += ' ' | |||
arquivo.writelines(linha) | |||
arquivo.close() | |||
if h != 0: | |||
add.destroy() | |||
rest.destroy() | |||
meu_rest(nome_rest) | |||
finish = Button(add, text = "Pronto!", compound = "left", bg = "#54d863", font = "Calibri 11", relief = "flat", command = valide) | |||
finish.place(x = 100, y = 300) | |||
finish.pack() | |||
add.mainloop() | |||
#-------------------------------------------------- | |||
#----------------- Função para deletar algo do cardápio | |||
def del_card(): | |||
delete = Tk() | |||
delete.geometry("250x250+300+150") | |||
delete.title("Deletar produto") | |||
tip = Label(delete, text="Tipo do produto:") | |||
tip.pack() | |||
ex = Label(delete, text="(entrada, principal, sobremesa ou bebida)", font = ("Calibri 11", 6)) | |||
ex.pack() | |||
t = Entry(delete) | |||
t.pack() | |||
nom = Label(delete, text="Nome:") | |||
nom.pack() | |||
n = Entry(delete) | |||
n.pack() | |||
t.pack() | |||
n.pack() | |||
# Deleta | |||
def valide(): | |||
tipo = t.get() | |||
comida = n.get() | |||
arquivo = open('dado.txt', 'r') | |||
texto = arquivo.readlines() | |||
arquivo.close() | |||
arquivo = open('dado.txt', 'w') | |||
h = 0 | |||
g = -2 | |||
c = 0 | |||
for linha in texto: | |||
lista = linha.split() | |||
if len(lista) and lista[0] == nome_rest: | |||
g = -1 | |||
if tipo == 'entrada': | |||
h = 1 | |||
elif tipo == 'principal': | |||
h = 2 | |||
elif tipo == 'sobremesa': | |||
h = 3 | |||
elif tipo == 'bebida': | |||
h = 4 | |||
else: | |||
nao = Label(delete, text = "Tipo de produto inválido.", font = ("Calibri 11", 8)) | |||
nao.pack() | |||
u = 0 | |||
lista2 = [] | |||
if g != -2 and h != 0: | |||
g+=1 | |||
if g == h: | |||
s = '' | |||
u = 1 | |||
v = 0 | |||
lista1 = linha.split() | |||
for i in lista1: | |||
if i == comida: | |||
v = 1 | |||
c = 1 | |||
elif v == 1: | |||
v = 0 | |||
else: | |||
lista2.append(i+' ') | |||
lista2.append('\n') | |||
if u == 1: | |||
arquivo.writelines(lista2) | |||
else: | |||
arquivo.writelines(linha) | |||
if c == 0 and h != 0: | |||
nao = Label(delete, text = "Esse produto não foi encontrado.", font = ("Calibri 11", 8)) | |||
nao.pack() | |||
nao1 = Label(delete, text = "Tente Novamente!", font = ("Calibri 11", 8)) | |||
nao1.pack() | |||
elif h != 0: | |||
arquivo.close() | |||
delete.destroy() | |||
rest.destroy() | |||
meu_rest(nome_rest) | |||
finish = Button(delete, text = "Pronto!", compound = "left", bg = "#54d863", font = "Calibri 11", relief = "flat", command = valide) | |||
finish.place(x = 100, y = 300) | |||
finish.pack() | |||
delete.mainloop() | |||
#--------------------------------------------------------- | |||
#------------------- Botoes de adicionar e deletar | |||
b_add = Button(rest, compound = "left", bg = "#54d863", text = "Adicionar produto", font = "Calibri 11", relief = "flat", command = add_card) | |||
b_add.pack() | |||
b_del = Button(rest, compound = "left", bg = "#ff1616", text = "Deletar produto", font = "Calibri 11", relief = "flat", command=del_card) | |||
b_del.pack() | |||
b_del_rest = Button(rest, compound = "left", bg = "#000000", fg = "white", text = "Deletar restaurante", font = "Calibri 11", relief = "flat", command=delete_rest) | |||
b_del_rest.pack() | |||
rest.pack() | |||
#------------------------------------------------------------------- | |||
#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ | |||
#FRAME PRINCIPAL | |||
#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ | |||
home = Frame(janela) | |||
tenho = Button(home, compound = "left", bg = "white", text = "Já tenho um restaurante", font = "Calibri 11", relief = "flat", command = tenho_rest) | |||
tenho.pack() | |||
home.pack() | |||
janela.mainloop() | |||
#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ | |||
#******************************************************************************************************************************************************************************************************************* | |||
19/06/2017 - 15:16 | 19/06/2017 - 15:16 | ||
Edição das 16h57min de 26 de junho de 2017
<syntaxhighlight lang="py">
26/06/2017 - 13:55
from tkinter import * from functools import partial from tkinter import ttk
#JANELA
- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
janela = Tk() janela.geometry("300x300+200+200") janela.title("Think About Eat!") janela["bg"] = "#eeddff"
- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
#FRAME DE FAZER O LOGIN
- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
def tenho_rest(): home.destroy() login = Frame() login["bg"] = "#eeddff"
usuario = Label(login, text = "Usuário: ", bg = "#eeddff") usuario.pack(fill = BOTH) us = Entry(login) us.pack()
senha = Label(login, text = "Senha: ", bg = "#eeddff") senha.pack() se = Entry(login, show = '*') se.pack()
#-------------Valida a senha def valido(): user = us.get() password = se.get()
arquivo = open('senhas.txt', 'r') texto = arquivo.readlines() arquivo.close()
k = 0 for linha in texto: lista = linha.split() if lista[0] == user: k = 1; if lista[1] == password: login.destroy() us.destroy() se.destroy() meu_rest(lista[2]) else: errou = Label(login, text = "Ahh, não! Algo está errado!", bg = "#d1fce1") errou.pack() if k == 0: errou = Label(login, text = "Ahh, não! Algo está errado!", bg = "#d1fce1") errou.pack()
finish = Button(login, text = "Pronto!", font = "Calibri 10 bold", bg = "#4f8c56", fg = "white", relief = "flat", command = valido) finish.pack() login.pack()
- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
#FRAME DO DONO DO RESTAURANTE
- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
def meu_rest(nome_rest): rest = Frame() rest["bg"] = "#eeddff"
nome = Label(rest, text = nome_rest, font = ("Helvetica Neue 95 Black", 16), bg = "#eeddff") nome.pack()
tabela = ttk.Treeview(rest, selectmode = 'browse', show = 'headings' , height = 7)
arquivo = open('dado.txt', 'r') texto = arquivo.readlines() arquivo.close()
g = -1 for linha in texto: lista = linha.split() if len(lista) and lista[0] == nome_rest: g+=1 if g != -1: g+=1 if g == 2: i = 0 lista = linha.split() while i < len(lista): tabela.insert("", 'end', text = "L1", values = (lista[i], lista[i+1])) i+=2 elif g == 3: i = 0 lista = linha.split() while i < len(lista): tabela.insert("", 'end', text = "L1", values = (lista[i], lista[i+1])) i+=2 elif g == 4: i = 0 lista = linha.split() while i < len(lista): tabela.insert("", 'end', text = "L1", values = (lista[i], lista[i+1])) i+=2 elif g == 5: i = 0 lista = linha.split() while i < len(lista): tabela.insert("", 'end', text = "L1", values = (lista[i], lista[i+1])) i+=2 g = -1 break
#------------------------ Tabela de produtos
tabela.pack() tabela["columns"] = ("1", "2") tabela['show'] = 'headings'
tabela.column("1", width=150, anchor='c') tabela.column("2", width=150, anchor='c')
tabela.heading("1", text="Nome") tabela.heading("2", text="Preço")
#-------------------------------------
#------------------------Função para deletar o restaurante def delete_rest():
j1 = Tk() j1.geometry("250x250+300+150") j1.title("Validação") tit = Label(j1, text="Digite sua senha:") tit.pack() sen = Entry(j1, show = '*') sen.pack()
#Valido a senha def valido(): senha = sen.get() arquivo = open('senhas.txt', 'r') texto = arquivo.readlines() arquivo.close()
for linha in texto: lista = linha.split() if len(lista) and lista[2] == nome_rest: if lista[1] == senha: deleta() else: errou = Label(j1, text = "Ahh, não! Algo está errado!") errou.pack()
def deleta(): #Deleto do arquivo de restaurantes arquivo = open('dado.txt', 'r') texto = arquivo.readlines() arquivo.close() arquivo = open('dado.txt', 'w') k = -2; for linha in texto: lista = linha.split() if len(lista) and lista[0] == nome_rest: k = -1 if k != -2: k+=1 if k == -1: arquivo.writelines(linha) if k == 4: k = -1 arquivo.close()
#Deleto do arquivo de logins arquivo = open('senhas.txt', 'r') texto = arquivo.readlines() arquivo.close() arquivo = open('senhas.txt', 'w') k = -2; for linha in texto: lista = linha.split() if lista[2] != nome_rest: arquivo.writelines(linha) arquivo.close() j1.destroy() janela.destroy()
ok = Button(j1, compound = "left", bg = "#54d863", text = "Ok", font = "Calibri 11", relief = "flat", command = valido) ok.pack()
#-------------------------------------------------------
#------------------------Função para adicionar algo no cardápio
def add_card():
add = Tk()
add.geometry("250x250+300+150")
add.title("Adicionar produto")
nome = nome_rest tip = Label(add, text="Tipo do produto:") tip.pack() ex = Label(add, text="(entrada, principal, sobremesa ou bebida)", font = ("Calibri 11", 6)) ex.pack() t = Entry(add) t.pack() nom = Label(add, text="Nome:") nom.pack() n = Entry(add) n.pack() prec = Label(add, text="Preço:") prec.pack() ex1 = Label(add, text="Ex: R$2,00", font = ("Calibri 11", 6)) ex1.pack() p = Entry(add) p.pack()
# Adiciona def valide(): tipo = t.get() novo = n.get() preco = p.get()
arquivo = open('dado.txt', 'r') texto = arquivo.readlines() arquivo.close()
#--------------------- Verifico se já existe h = 0 g = -1 y = -1 b = 0 x = 0 for linha in texto: lista = linha.split() if len(lista) and lista[0] == nome: y += 1 if tipo == 'entrada': b = 1 elif tipo == 'principal': b = 2 elif tipo == 'sobremesa': b = 3 elif tipo == 'bebida': b = 4 else: break elif y != -1: y += 1 if b == y: for i in lista: if i == novo: x = 1 nao = Label(add, text = "Produto já existente.", font = ("Calibri 11", 8)) nao.pack() break
#----------------------- Se nao existir, crio if x == 0: arquivo = open('dado.txt', 'w') for linha in texto: lista = linha.split() if len(lista) and lista[0] == nome: g = 0 if tipo == 'entrada': h = 1 elif tipo == 'principal': h = 2 elif tipo == 'sobremesa': h = 3 elif tipo == 'bebida': h = 4 else: nao = Label(add, text = "Tipo de produto inválido.", font = ("Calibri 11", 8)) nao.pack() if g != -1 and h != 0: g+=1 if g == h: k = len(linha) linha += novo linha += ' ' linha += preco linha += ' ' arquivo.writelines(linha) arquivo.close() if h != 0: add.destroy() rest.destroy() meu_rest(nome_rest)
finish = Button(add, text = "Pronto!", compound = "left", bg = "#54d863", font = "Calibri 11", relief = "flat", command = valide) finish.place(x = 100, y = 300) finish.pack() add.mainloop()
#--------------------------------------------------
#----------------- Função para deletar algo do cardápio def del_card(): delete = Tk() delete.geometry("250x250+300+150") delete.title("Deletar produto")
tip = Label(delete, text="Tipo do produto:") tip.pack() ex = Label(delete, text="(entrada, principal, sobremesa ou bebida)", font = ("Calibri 11", 6)) ex.pack() t = Entry(delete) t.pack() nom = Label(delete, text="Nome:") nom.pack() n = Entry(delete) n.pack() t.pack() n.pack()
# Deleta def valide(): tipo = t.get() comida = n.get()
arquivo = open('dado.txt', 'r') texto = arquivo.readlines() arquivo.close() arquivo = open('dado.txt', 'w')
h = 0 g = -2 c = 0 for linha in texto: lista = linha.split() if len(lista) and lista[0] == nome_rest: g = -1 if tipo == 'entrada': h = 1 elif tipo == 'principal': h = 2 elif tipo == 'sobremesa': h = 3 elif tipo == 'bebida': h = 4 else: nao = Label(delete, text = "Tipo de produto inválido.", font = ("Calibri 11", 8)) nao.pack() u = 0 lista2 = [] if g != -2 and h != 0: g+=1 if g == h: s = u = 1 v = 0 lista1 = linha.split() for i in lista1: if i == comida: v = 1 c = 1 elif v == 1: v = 0 else: lista2.append(i+' ') lista2.append('\n') if u == 1: arquivo.writelines(lista2) else: arquivo.writelines(linha)
if c == 0 and h != 0: nao = Label(delete, text = "Esse produto não foi encontrado.", font = ("Calibri 11", 8)) nao.pack() nao1 = Label(delete, text = "Tente Novamente!", font = ("Calibri 11", 8)) nao1.pack() elif h != 0: arquivo.close() delete.destroy() rest.destroy() meu_rest(nome_rest)
finish = Button(delete, text = "Pronto!", compound = "left", bg = "#54d863", font = "Calibri 11", relief = "flat", command = valide) finish.place(x = 100, y = 300) finish.pack() delete.mainloop()
#---------------------------------------------------------
#------------------- Botoes de adicionar e deletar b_add = Button(rest, compound = "left", bg = "#54d863", text = "Adicionar produto", font = "Calibri 11", relief = "flat", command = add_card) b_add.pack() b_del = Button(rest, compound = "left", bg = "#ff1616", text = "Deletar produto", font = "Calibri 11", relief = "flat", command=del_card) b_del.pack() b_del_rest = Button(rest, compound = "left", bg = "#000000", fg = "white", text = "Deletar restaurante", font = "Calibri 11", relief = "flat", command=delete_rest) b_del_rest.pack() rest.pack() #-------------------------------------------------------------------
- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
#FRAME PRINCIPAL
- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
home = Frame(janela) tenho = Button(home, compound = "left", bg = "white", text = "Já tenho um restaurante", font = "Calibri 11", relief = "flat", command = tenho_rest) tenho.pack() home.pack() janela.mainloop()
- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$