Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../lib64/python3..../tkinter
File: dialog.py
# dialog.py -- Tkinter interface to the tk_dialog script.
[0] Fix | Delete
[1] Fix | Delete
from tkinter import *
[2] Fix | Delete
from tkinter import _cnfmerge
[3] Fix | Delete
[4] Fix | Delete
DIALOG_ICON = 'questhead'
[5] Fix | Delete
[6] Fix | Delete
[7] Fix | Delete
class Dialog(Widget):
[8] Fix | Delete
def __init__(self, master=None, cnf={}, **kw):
[9] Fix | Delete
cnf = _cnfmerge((cnf, kw))
[10] Fix | Delete
self.widgetName = '__dialog__'
[11] Fix | Delete
Widget._setup(self, master, cnf)
[12] Fix | Delete
self.num = self.tk.getint(
[13] Fix | Delete
self.tk.call(
[14] Fix | Delete
'tk_dialog', self._w,
[15] Fix | Delete
cnf['title'], cnf['text'],
[16] Fix | Delete
cnf['bitmap'], cnf['default'],
[17] Fix | Delete
*cnf['strings']))
[18] Fix | Delete
try: Widget.destroy(self)
[19] Fix | Delete
except TclError: pass
[20] Fix | Delete
[21] Fix | Delete
def destroy(self): pass
[22] Fix | Delete
[23] Fix | Delete
[24] Fix | Delete
def _test():
[25] Fix | Delete
d = Dialog(None, {'title': 'File Modified',
[26] Fix | Delete
'text':
[27] Fix | Delete
'File "Python.h" has been modified'
[28] Fix | Delete
' since the last time it was saved.'
[29] Fix | Delete
' Do you want to save it before'
[30] Fix | Delete
' exiting the application.',
[31] Fix | Delete
'bitmap': DIALOG_ICON,
[32] Fix | Delete
'default': 0,
[33] Fix | Delete
'strings': ('Save File',
[34] Fix | Delete
'Discard Changes',
[35] Fix | Delete
'Return to Editor')})
[36] Fix | Delete
print(d.num)
[37] Fix | Delete
[38] Fix | Delete
[39] Fix | Delete
if __name__ == '__main__':
[40] Fix | Delete
t = Button(None, {'text': 'Test',
[41] Fix | Delete
'command': _test,
[42] Fix | Delete
Pack: {}})
[43] Fix | Delete
q = Button(None, {'text': 'Quit',
[44] Fix | Delete
'command': t.quit,
[45] Fix | Delete
Pack: {}})
[46] Fix | Delete
t.mainloop()
[47] Fix | Delete
[48] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function