Python has classes for Tkinter variables StringVar()
, BooleanVar()
, etc. These all share the methods get()
, set(string)
, and trace(mode, callback)
. The callback
function passed as the second argument to trace(mode, callback)
is passed four arguments, self, n, m, x
.
For an example of a BooleanVar()
these appear to be '', 'PYVAR0', 'w'
.
The third argument x
appears to be the mode that triggered the trace, in my case the variable was changed. However, what is the first variable that appears to be an empty string? What is the second, if I had to guess I'd say some internal name for the variable?