How do you close all Tkinter windows when specific window closes?
问题 I have this application in Python Tkinter. There is a Python file which is a main menu. When I click an option in the main menu it imports a python file with code that makes a new window (couldn't use Toplevel for the new window for some reasons). So when I close the main menu it should close all the other windows. Here is my code for the main menu: from tkinter import * root = Tk() root.geometry("600x600") def newWindowImport(): import file1 def newWindowImport2(): import file2 newWindow =