In wxPython & PyQt when you open a popup and close it, followed by closing main window, then application's loop is still running. When you close the main window before closing the popup, then you ...