ventana de bloque si otra ventana está abierta tkinter
b.grab_set() # when you show the popup
# do stuff ...
b.grab_release() # to return to normal
Odd Oryx
b.grab_set() # when you show the popup
# do stuff ...
b.grab_release() # to return to normal
You can also do this with an if statement:
if wind1 is not None and win1.winfo_exists():
pass
else:
wind1 = tk.Tk()
wind1.title('Window 1')
w1button1 = ttk.Button(wind1,text='Launch Window 2', command=startwind2)
w1button1.pack()
w1button2 = ttk.Button(wind1,text='Check if Window 2 exists',command=checkwind2)
w1button2.pack()
wind1.mainloop()