# dialog.py -- Tkinter interface to the tk_dialog script.
from tkinter import _cnfmerge
DIALOG_ICON = 'questhead'
def __init__(self, master=None, cnf={}, **kw):
cnf = _cnfmerge((cnf, kw))
self.widgetName = '__dialog__'
Widget._setup(self, master, cnf)
self.num = self.tk.getint(
cnf['title'], cnf['text'],
cnf['bitmap'], cnf['default'],
try: Widget.destroy(self)
d = Dialog(None, {'title': 'File Modified',
'File "Python.h" has been modified'
' since the last time it was saved.'
' Do you want to save it before'
' exiting the application.',
if __name__ == '__main__':
t = Button(None, {'text': 'Test',
q = Button(None, {'text': 'Quit',