trace method 'u' argument equivalent for trace_add? trace method 'u' argument equivalent for trace_add? tkinter tkinter

trace method 'u' argument equivalent for trace_add?


In general, in such cases you can always fire up your REPL and call help on trace_add to examine its docstring.

>>> from tkinter import StringVar>>> help(StringVar.trace_add)

For trace_add the following is stated:

trace_add(self, mode, callback)

Define a trace callback for the variable.

Mode is one of "read", "write", "unset", or a list or tuple of such strings. Callback must be a function which is called when the variable is read, written or unset.

Return the name of the callback.

So, judging from that, 'wu' should now be ['write', 'unset'].