[issue27025] More human readable generated widget names

Terry J. Reedy report at bugs.python.org
Wed Jun 1 21:29:56 EDT 2016


Terry J. Reedy added the comment:

Try this instead.

import tkinter as tk
from idlelib.configdialog import ConfigDialog
from idlelib import macosx

_realsetup = tk.BaseWidget._setup
def _wrapsetup(self, master, cnf):
    _realsetup(self, master, cnf)
    print(self.widgetName, self._w)
tk.BaseWidget._setup = _wrapsetup

root = tk.Tk()
macosx._initializeTkVariantTests(root)
ConfigDialog(root)
tk.BaseWidget._setup = _realsetup

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27025>
_______________________________________


More information about the Python-bugs-list mailing list