def runui(self): global HELP_TEXT exported.add_help("tkui", HELP_TEXT) exported.write_message('For tk help type "#help tkui".') exported.add_command("colorcheck", colorcheck_cmd) # run the tk mainloop here self._tk.mainloop()
def runui(self): global HELP_TEXT exported.add_help("tkui", HELP_TEXT) exported.write_message("For tk help type \"#help tkui\".") exported.add_command("colorcheck", colorcheck_cmd) # run the tk mainloop here self._tk.mainloop()
def load_commands(commands_dict): """ Takes in a dict and loads all the commands in that dict. The dict is a mapping of command name to arguments to be passed to exported.add_command. Pretty much we just turn around and call exported.add_command with the arguments in the dict without any transformation at all. @param commands_dict: the map holding the command names and the arguments we need to call exported.add_command repeatedly @type commands_dict: dict """ for mem in commands_dict.keys(): args = commands_dict[mem] if type(args) == types.TupleType: exported.add_command(*((mem, ) + args)) else: exported.add_command(mem, args)
def load_commands(commands_dict): """ Takes in a dict and loads all the commands in that dict. The dict is a mapping of command name to arguments to be passed to exported.add_command. Pretty much we just turn around and call exported.add_command with the arguments in the dict without any transformation at all. @param commands_dict: the map holding the command names and the arguments we need to call exported.add_command repeatedly @type commands_dict: dict """ for mem in commands_dict.keys(): args = commands_dict[mem] if type(args) == types.TupleType: exported.add_command(*((mem,)+args)) else: exported.add_command(mem, args)
def load(): exported.add_command("@", python_cmd) exported.add_command("^load", load_cmd, "modulename reload:boolean=true") exported.add_command("^unload", unload_cmd, "modulename")