MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / CallWrapper

Class CallWrapper

tools/python-3.11.9-amd64/Lib/tkinter/__init__.py:1952–1971  ·  view source on GitHub ↗

Internal class. Stores function to call when some user defined Tcl function is called e.g. after an event occurred.

Source from the content-addressed store, hash-verified

1950
1951
1952class CallWrapper:
1953 """Internal class. Stores function to call when some user
1954 defined Tcl function is called e.g. after an event occurred."""
1955
1956 def __init__(self, func, subst, widget):
1957 """Store FUNC, SUBST and WIDGET as members."""
1958 self.func = func
1959 self.subst = subst
1960 self.widget = widget
1961
1962 def __call__(self, *args):
1963 """Apply first function SUBST to arguments, than FUNC."""
1964 try:
1965 if self.subst:
1966 args = self.subst(*args)
1967 return self.func(*args)
1968 except SystemExit:
1969 raise
1970 except:
1971 self.widget._report_exception()
1972
1973
1974class XView:

Callers 2

_registerMethod · 0.85
_registerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected