Tkinter is opening multiple GUI windows upon file selection with multiprocessing, when only one window should exist
问题 I have primary.py: from tkinter import * from tkinter.filedialog import askopenfilename from tkinter import ttk import multiprocessing as mp import other_script class GUI: def __init__(self, master): self.master = master def file_select(): path = askopenfilename() if __name__ == '__main__': queue = mp.Queue() queue.put(path) import_ds_proc = mp.Process(target=other_script.dummy, args=(queue,)) import_ds_proc.daemon = True import_ds_proc.start() # GUI root = Tk() my_gui = GUI(root) # Display