Beispiel #1
0
 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
Beispiel #2
0
 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()
Beispiel #3
0
def get_help(class_name):
    c = command_factory(class_name)
    return c.help