3. Usando un messagebox¶
def salvar_dados():
try:
fileD = open("encomendas.txt","a")
fileD.write("Destino:\n")
fileD.write("%s\n" %destino.get())
fileD.write("Descricao:\n")
fileD.write("%s\n" %descricao.get())
fileD.write("Endereco:\n")
fileD.write("%s\n" %endereco.get("1.0",END))
destino.set(None)
descricao.delete(0,END)
endereco.delete("1.0",END)
except Exception as excecao:
app.title('Erro de gravacao no arquivo %s' %excecao)


You have attempted of activities on this page