trepan/processor/cmdproc.py
def _populate_cmd_lists(self):
        """ Populate self.lists and hashes:
        self.commands, and self.aliases, self.category """
        self.commands = {}
        self.aliases = {}
        self.category = {}
#         self.short_help = {}
        for cmd_instance in self.cmd_instances:
            if not hasattr(cmd_instance, 'aliases'): continue
            alias_names = cmd_instance.aliases
            cmd_name = cmd_instance.name
            self.commands[cmd_name] = cmd_instance
            for alias_name in alias_names:
                self.aliases[alias_name] = cmd_name
                pass
            cat  = getattr(cmd_instance, 'category')
            if cat and self.category.get(cat):
                self.category[cat].append(cmd_name)
            else:
                self.category[cat] = [cmd_name]
                pass
#             sh = getattr(cmd_instance, 'short_help')
#             if sh:
#                 self.short_help[cmd_name] = getattr(c, 'short_help')
#                 pass
            pass
        for k in list(self.category.keys()):
            self.category[k].sort()
            pass

        return
def _populate_cmd_lists(self):
        """ Populate self.lists and hashes:
        self.commands, and self.aliases, self.category """
        self.commands = {}
        self.aliases = {}
        self.category = {}
#         self.short_help = {}
        for cmd_instance in self.cmd_instances:
            if not hasattr(cmd_instance, 'aliases'): continue
            alias_names = cmd_instance.aliases
            cmd_name = cmd_instance.name
            self.commands[cmd_name] = cmd_instance
            for alias_name in alias_names:
                self.aliases[alias_name] = cmd_name
                pass
            cat  = getattr(cmd_instance, 'category')
            if cat and self.category.get(cat):
                self.category[cat].append(cmd_name)
            else:
                self.category[cat] = [cmd_name]
                pass
#             sh = getattr(cmd_instance, 'short_help')
#             if sh:
#                 self.short_help[cmd_name] = getattr(c, 'short_help')
#                 pass
            pass
        for k in list(self.category.keys()):
            self.category[k].sort()
            pass

        return
def _populate_cmd_lists ( self ) : self . commands = { } self . aliases = { } self . category = { } #         self.short_help = {} for cmd_instance in self . cmd_instances : if not hasattr ( cmd_instance , 'aliases' ) : continue alias_names = cmd_instance . aliases cmd_name = cmd_instance . name self . commands [ cmd_name ] = cmd_instance for alias_name in alias_names : self . aliases [ alias_name ] = cmd_name pass cat = getattr ( cmd_instance , 'category' ) if cat and self . category . get ( cat ) : self . category [ cat ] . append ( cmd_name ) else : self . category [ cat ] = [ cmd_name ] pass #             sh = getattr(cmd_instance, 'short_help') #             if sh: #                 self.short_help[cmd_name] = getattr(c, 'short_help') #                 pass pass for k in list ( self . category . keys ( ) ) : self . category [ k ] . sort ( ) pass return
Populate self.lists and hashes:
        self.commands, and self.aliases, self.category
Populate self . lists and hashes : self . commands and self . aliases self . category