Esempio n. 1
0
 def prompt_verify_command(self, command, args):
     for x in COMMANDS:
         if x == command and COMMANDS[x]['required_argument'] and not args:
             printc("white", 'Usage: {0} {1} ...'.format(x, COMMANDS[x]['usage']))
             printc("yellow", "\nOptions:");
             for opt in COMMANDS[x]['opts']:
                 printc_raw("blue", "  %s" %(opt))
                 printc("white", "\t%s" % (COMMANDS[x]['opts'][opt]))
             return False
     return True
Esempio n. 2
0
 def prompt_usage(self):
     printc("white", "Usage: help")
     printc("yellow", "\nOptions:")
     for x in COMMANDS:
         print("  {0}  {1}".format(color("blue", x),
                                   color("white", COMMANDS[x]['help'])))