def run(self, *args, **kwargs): logger.info('Available Commands:') for command_name, command in commands.registry.commands_iter(): logger.info(' %s: %s' % (command_name, command.description))
def display_readable(self, collected_commands): logger.info('Available Commands:') for command in collected_commands: logger.info(' %s: %s' % (command['name'], command['description']))
def display_json(self, collected_commands): json_string = json.dumps(dict(commands=collected_commands)) logger.info(json_string)