Exemplo n.º 1
0
def makecommand(master, name, func, subst=None, needcleanup=0):
    f = Tkinter.CallWrapper(func, subst, master).__call__
    master.tk.createcommand(name, f)
    if needcleanup:
        if master._tclCommands is None:
            master._tclCommands = []
        master._tclCommands.append(name)
    return name