def display_commands(self): ret = [] for command in yabt.utils.find_commands(): try: klass = command_factory(command) ret.append("%10s - %s" % (klass.cmd, klass.desc)) except AttributeError, e: pass
def run(self): if self.options.options.version: print self.version_line() return if len(self.options.args) > 0 : klass = command_factory(self.options.args[0]) klass(self).run() else: self.usage()
def get_help(class_name): c = command_factory(class_name) return c.help