help please fix the script
import tkinter import sys def yesNo(title, message): if tkinter.messagebox.askyesno(title, message): result = True else: result = False return result if yesNo("Exit", "Do you want to quit?"): print('t') sys.exit() else: print('f') input()
after launching from IDLE and clicking a button in the askyesno dialog, the console displays "t" or "f". however, exit from the program does not occur (that is, the sys.exit () instruction is not executed)
If this code is run in windows7 from the total commander by double clicking on the file name, then the console's black screen is displayed for a split second and closes.