'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.'

def trace_variable(self, mode, callback):

    cbname = self._master._register(callback)
    self._tk.call('trace', 'variable', self._name, mode, cbname)
    return cbname
