tkinter_tutorial_12.py (274B)
1 from Tkinter import * 2 import tkMessageBox 3 4 root = Tk() 5 6 tkMessageBox.showinfo('Window Title', 'This is the text in the msg') 7 8 answer = tkMessageBox.askquestion('The Question', 'You like dat text?') 9 10 if answer == 'yes': 11 print "Dat good ol' text" 12 13 root.mainloop()