Example #1
0
    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()
Example #2
0
    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()
Example #3
0
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)
Example #4
0
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)
Example #5
0
def load():
  exported.add_command("@", python_cmd)
  exported.add_command("^load", load_cmd, "modulename reload:boolean=true")
  exported.add_command("^unload", unload_cmd, "modulename")
Example #6
0
def load():
    exported.add_command("@", python_cmd)
    exported.add_command("^load", load_cmd, "modulename reload:boolean=true")
    exported.add_command("^unload", unload_cmd, "modulename")