Consider:
import Tkinter as tk
import tkMessageBox
root = tk.Tk()
root.withdraw()
if True:
tkMessageBox.askyesno("aa", "bb?")
tkMessageBox.askyesno("aa1", "bb1?")
tkMessageBox.askyesno("aa2", "bb2?")
When the second or the third (the results vary between the runs!) tkMessageBox.askyesno
is invoked, two icons (both for the title "aa1" or "aa2", respectively) appear on my Ubuntu 16.04 launcher as shown in the above screenshot. I tried doing root.update()
between the calls of tkMessageBox.askyesno
without improvement. What is going on and how do I fix this?