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

Function _widget_redirector

Lib/idlelib/redirector.py:152–166  ·  view source on GitHub ↗
(parent)

Source from the content-addressed store, hash-verified

150
151
152def _widget_redirector(parent): # htest #
153 from tkinter import Toplevel, Text
154
155 top = Toplevel(parent)
156 top.title("Test WidgetRedirector")
157 x, y = map(int, parent.geometry().split('+')[1:])
158 top.geometry("+%d+%d" % (x, y + 175))
159 text = Text(top)
160 text.pack()
161 text.focus_set()
162 redir = WidgetRedirector(text)
163 def my_insert(*args):
164 print("insert", args)
165 original_insert(*args)
166 original_insert = redir.register("insert", my_insert)
167
168
169if __name__ == "__main__":

Callers

nothing calls this directly

Calls 8

registerMethod · 0.95
ToplevelClass · 0.90
TextClass · 0.90
WidgetRedirectorClass · 0.85
titleMethod · 0.45
splitMethod · 0.45
packMethod · 0.45
focus_setMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…