I have a script called GUI running two tkinter windows and I've been able to kill my program from within the script by creating a function for it
def gui_kill():
root.destroy()
win.destroy()
However, under certain conditions, I am trying to kill them from an external file. I've tried many things including
from GUI import root, win
root.destroy()
win.destroy()
and
from GUI import root, win, gui_kill
gui_kill()
some produce errors, some don't but none of them kill the windows