I have something like this:
first.py
from tkinter import *
def new_window(event):
root.destroy()
import second
root = Tk()
b = Button(root, text='New window')
b.pack()
b.bind('<Button-1>', new_window)
root.mainloop()
second.py
from tkinter import *
root = Tk()
root.mainloop()
But when I open the second window, the first one is destroyed (I hope so), but the second one is frozen (it is shown, but there is no close-button on the top and I only see the launch-icon). Why is it so? Don't I kill the first loop?