(self, func, subst=None, needcleanup=1)
return name
Return a newly created Tcl function. If this
        function is called, the Python function FUNC will
        be executed. An optional function SUBST can
        be given which will be executed before FUNC.
Return a newly created Tcl function. If this
        function is called, the Python function FUNC will
        be executed. An optional function SUBST can
        be given which will be executed before FUNC.
Return a newly created Tcl function . If this function is called the Python function FUNC will be executed . An optional function SUBST can be given which will be executed before FUNC .
def _register(self, func, subst=None, needcleanup=1):
        """Return a newly created Tcl function. If this
        function is called, the Python function FUNC will
        be executed. An optional function SUBST can
        be given which will be executed before FUNC."""
        f = CallWrapper(func, subst, self).__call__
        name = repr(id(f))
        try:
            func = func.__func__
        except AttributeError:
            pass
        try:
            name = name + func.__name__
        except AttributeError:
            pass
        self.tk.createcommand(name, f)
        if needcleanup:
            if self._tclCommands is None:
                self._tclCommands = []
            self._tclCommands.append(name)
        return name
def _register ( self , func , subst = None , needcleanup = 1 ) : f = CallWrapper ( func , subst , self ) . __call__ name = repr ( id ( f ) ) try : func = func . __func__ except AttributeError : pass try : name = name + func . __name__ except AttributeError : pass self . tk . createcommand ( name , f ) if needcleanup : if self . _tclCommands is None : self . _tclCommands = [ ] self . _tclCommands . append ( name ) return name