X7ROOT File Manager
Current Path:
/lib64/python2.7/lib-tk
lib64
/
python2.7
/
lib-tk
/
??
..
??
Canvas.py
(7.29 KB)
??
Canvas.pyc
(15.2 KB)
??
Canvas.pyo
(15.2 KB)
??
Dialog.py
(1.53 KB)
??
Dialog.pyc
(1.88 KB)
??
Dialog.pyo
(1.88 KB)
??
FileDialog.py
(8.62 KB)
??
FileDialog.pyc
(9.49 KB)
??
FileDialog.pyo
(9.49 KB)
??
FixTk.py
(2.95 KB)
??
FixTk.pyc
(2.04 KB)
??
FixTk.pyo
(1.98 KB)
??
ScrolledText.py
(1.79 KB)
??
ScrolledText.pyc
(2.6 KB)
??
ScrolledText.pyo
(2.6 KB)
??
SimpleDialog.py
(3.64 KB)
??
SimpleDialog.pyc
(4.24 KB)
??
SimpleDialog.pyo
(4.24 KB)
??
Tix.py
(75.41 KB)
??
Tix.pyc
(93.84 KB)
??
Tix.pyo
(93.84 KB)
??
Tkconstants.py
(1.46 KB)
??
Tkconstants.pyc
(2.19 KB)
??
Tkconstants.pyo
(2.19 KB)
??
Tkdnd.py
(11.22 KB)
??
Tkdnd.pyc
(12.52 KB)
??
Tkdnd.pyo
(12.52 KB)
??
Tkinter.py
(156.85 KB)
??
Tkinter.pyc
(195.5 KB)
??
Tkinter.pyo
(195.5 KB)
??
test
??
tkColorChooser.py
(1.74 KB)
??
tkColorChooser.pyc
(1.39 KB)
??
tkColorChooser.pyo
(1.39 KB)
??
tkCommonDialog.py
(1.38 KB)
??
tkCommonDialog.pyc
(1.48 KB)
??
tkCommonDialog.pyo
(1.48 KB)
??
tkFileDialog.py
(5.59 KB)
??
tkFileDialog.pyc
(5.04 KB)
??
tkFileDialog.pyo
(5.04 KB)
??
tkFont.py
(6.02 KB)
??
tkFont.pyc
(7 KB)
??
tkFont.pyo
(7 KB)
??
tkMessageBox.py
(3.6 KB)
??
tkMessageBox.pyc
(3.8 KB)
??
tkMessageBox.pyo
(3.8 KB)
??
tkSimpleDialog.py
(7.54 KB)
??
tkSimpleDialog.pyc
(8.9 KB)
??
tkSimpleDialog.pyo
(8.9 KB)
??
ttk.py
(54.86 KB)
??
ttk.pyc
(61.16 KB)
??
ttk.pyo
(61.16 KB)
??
turtle.py
(135.78 KB)
??
turtle.pyc
(136.31 KB)
??
turtle.pyo
(136.31 KB)
Editing: Dialog.py
# 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()
Upload File
Create Folder