コード例 #1
0
ファイル: tkui.py プロジェクト: v-legoff/accertin
    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()
コード例 #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()
コード例 #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)
コード例 #4
0
ファイル: modutils.py プロジェクト: v-legoff/accertin
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)
コード例 #5
0
ファイル: advanced.py プロジェクト: OSadovy/lyntin
def load():
  exported.add_command("@", python_cmd)
  exported.add_command("^load", load_cmd, "modulename reload:boolean=true")
  exported.add_command("^unload", unload_cmd, "modulename")
コード例 #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")