I have a main window, and a button inside of this one, I open another window, which is closed by another button. How is it possible that once the latter is closed you can not reopen it? I attach the code of the two programs.
FIRST PROGRAM
from tkinter import *
def funzBottoCli():import nuovaprova
root = Tk()
root.state('zoomed')
root.title("Gestionale")
bottonCli = Button(root, text=" Apertura altra finestra ", fg=('red'),
font=('arial',10,'bold'), relief='raised', command=funzBottoCli).place(x=20, y=20)
root.mainloop()
#SECOND PROGRAM
from tkinter import *
def funzBottoCli():fine_cli_ins.destroy()
fine_cli_ins = Tk()
fine_cli_ins.title("Inserimento Anagrafica Clienti")
fine_cli_ins.geometry('640x480+400+150')
form1 = Frame(fine_cli_ins, bg='red',width=640, height=50, relief='raised',
border=3).pack()
label1 = Label(fine_cli_ins, text=(" INSERIMENTO CLIENTI "), fg=('red'),
bg=('gray'),
font=('arial',16,'bold'), relief='raised').place(x=200, y=10)
bottonCli = Button(fine_cli_ins, text=" Chiusura finestra ", fg=('red'),
font=('arial',10,'bold'), relief='raised', command=funzBottoCli).place(x=260, y=400)
fine_cli_ins.mainloop()