PATH:
usr
/
lib64
/
python2.7
/
lib-tk
# dialog.py -- Tkinter interface to the tk_dialog script. from Tkinter import * from Tkinter import _cnfmerge if TkVersion <= 3.6: DIALOG_ICON = 'warning' else: DIALOG_ICON = 'questhead' class Dialog(Widget): def __init__(self, master=None, cnf={}, **kw): cnf = _cnfmerge((cnf, kw)) self.widgetName = '__dialog__' Widget._setup(self, master, cnf) self.num = self.tk.getint( self.tk.call( 'tk_dialog', self._w, cnf['title'], cnf['text'], cnf['bitmap'], cnf['default'], *cnf['strings'])) try: Widget.destroy(self) except TclError: pass def destroy(self): pass def _test(): d = Dialog(None, {'title': 'File Modified', 'text': 'File "Python.h" has been modified' ' since the last time it was saved.' ' Do you want to save it before' ' exiting the application.', 'bitmap': DIALOG_ICON, 'default': 0, 'strings': ('Save File', 'Discard Changes', 'Return to Editor')}) print d.num if __name__ == '__main__': t = Button(None, {'text': 'Test', 'command': _test, Pack: {}}) q = Button(None, {'text': 'Quit', 'command': t.quit, Pack: {}}) t.mainloop()
[-] tkCommonDialog.pyc
[edit]
[-] Tkconstants.pyo
[edit]
[-] ttk.py
[edit]
[-] FileDialog.pyc
[edit]
[-] tkFont.pyc
[edit]
[-] ttk.pyo
[edit]
[-] FixTk.py
[edit]
[-] Dialog.pyc
[edit]
[-] tkFont.py
[edit]
[-] Tkdnd.pyc
[edit]
[-] FileDialog.py
[edit]
[-] ttk.pyc
[edit]
[-] Tkinter.pyo
[edit]
[-] SimpleDialog.pyo
[edit]
[+]
..
[-] Canvas.py
[edit]
[-] Tkconstants.py
[edit]
[-] SimpleDialog.py
[edit]
[-] Tkdnd.py
[edit]
[-] tkColorChooser.pyo
[edit]
[-] tkMessageBox.py
[edit]
[-] FixTk.pyc
[edit]
[-] FileDialog.pyo
[edit]
[-] tkCommonDialog.py
[edit]
[-] tkSimpleDialog.py
[edit]
[-] tkSimpleDialog.pyo
[edit]
[-] turtle.pyc
[edit]
[-] ScrolledText.pyo
[edit]
[-] Tix.pyo
[edit]
[-] Canvas.pyo
[edit]
[-] tkFileDialog.pyc
[edit]
[-] tkFileDialog.py
[edit]
[-] tkColorChooser.pyc
[edit]
[-] Tkdnd.pyo
[edit]
[-] ScrolledText.py
[edit]
[-] Tkconstants.pyc
[edit]
[-] FixTk.pyo
[edit]
[-] tkSimpleDialog.pyc
[edit]
[-] SimpleDialog.pyc
[edit]
[-] tkFileDialog.pyo
[edit]
[-] ScrolledText.pyc
[edit]
[-] Dialog.py
[edit]
[-] Tix.pyc
[edit]
[-] Canvas.pyc
[edit]
[-] tkColorChooser.py
[edit]
[-] Tix.py
[edit]
[-] tkCommonDialog.pyo
[edit]
[-] Tkinter.py
[edit]
[-] Tkinter.pyc
[edit]
[-] tkMessageBox.pyo
[edit]
[-] tkMessageBox.pyc
[edit]
[+]
test
[-] tkFont.pyo
[edit]
[-] turtle.py
[edit]
[-] Dialog.pyo
[edit]
[-] turtle.pyo
[edit]