MCPcopy Index your code
hub / github.com/RustPython/RustPython / trace_variable

Method trace_variable

Lib/tkinter/__init__.py:492–507  ·  view source on GitHub ↗

Define a trace callback for the variable. MODE is one of "r", "w", "u" for read, write, undefine. CALLBACK must be a function which is called when the variable is read, written or undefined. Return the name of the callback. This deprecated method wraps a de

(self, mode, callback)

Source from the content-addressed store, hash-verified

490 splitlist(self._tk.call('trace', 'info', 'variable', self._name)))]
491
492 def trace_variable(self, mode, callback):
493 """Define a trace callback for the variable.
494
495 MODE is one of "r", "w", "u" for read, write, undefine.
496 CALLBACK must be a function which is called when
497 the variable is read, written or undefined.
498
499 Return the name of the callback.
500
501 This deprecated method wraps a deprecated Tcl method that will
502 likely be removed in the future. Use trace_add() instead.
503 """
504 # TODO: Add deprecation warning
505 cbname = self._register(callback)
506 self._tk.call("trace", "variable", self._name, mode, cbname)
507 return cbname
508
509 trace = trace_variable
510

Callers

nothing calls this directly

Calls 2

_registerMethod · 0.95
callMethod · 0.45

Tested by

no test coverage detected