when I was working with Tkinter in python, I encountered an interesting problem that when I run a python program in Linux Terminal, my code opened a Tkinter widget like this:
root = Tk()
root.title("Hello World")
txt = Text(root, width=60, height=20, wrap="word")
txt.insert(INSERT, "HELLO WORLD")
txt.insert(END, "---------------END---------------")
txt.config(state=DISABLED)
txt.bind("<Leave>", close_when_lost_focus)
txt.pack()
root.mainloop()
and then I force quit python program with Ctrl + Z, the Tkinter window was still there and I couldn't close it until I closed the Terminal.
Any body knows what happened?