MCPcopy Index your code
hub / github.com/python/cpython / nametowidget

Method nametowidget

Lib/tkinter/__init__.py:1682–1697  ·  view source on GitHub ↗

Return the Tkinter instance of a widget identified by its Tcl name NAME.

(self, name)

Source from the content-addressed store, hash-verified

1680 return res
1681
1682 def nametowidget(self, name):
1683 """Return the Tkinter instance of a widget identified by
1684 its Tcl name NAME."""
1685 name = str(name).split('.')
1686 w = self
1687
1688 if not name[0]:
1689 w = w._root()
1690 name = name[1:]
1691
1692 for n in name:
1693 if not n:
1694 break
1695 w = w.children[n]
1696
1697 return w
1698
1699 _nametowidget = nametowidget
1700

Callers 4

pack_infoMethod · 0.80
place_infoMethod · 0.80
grid_infoMethod · 0.80
__getitem__Method · 0.80

Calls 3

strFunction · 0.85
_rootMethod · 0.80
splitMethod · 0.45

Tested by

no test coverage detected