parameters: (args)
docstring: Main command-line execution for igor.
  
      Verbs are taken from the command line, and extra words taken as directed
      by the arguments needed by the handler.
docstring_summary: Main command-line execution for igor.
docstring_tokens: Main command - line execution for igor .
function: def main(args):
      """Main command-line execution for igor.
  
      Verbs are taken from the command line, and extra words taken as directed
      by the arguments needed by the handler.
  
      """
      while args:
          verb = args.pop(0)
          handler = globals().get('do_'+verb)
          if handler is None:
              print("*** No handler for %r" % verb)
              return 1
          star, num_args = analyze_args(handler)
          if star:
              # Handler has *args, give it all the rest of the command line.
              handler_args = args
              args = []
          else:
              # Handler has specific arguments, give it only what it needs.
              handler_args = args[:num_args]
              args = args[num_args:]
          ret = handler(*handler_args)
          # If a handler returns a failure-like value, stop.
          if ret:
              return ret
function_tokens: def main ( args ) : while args : verb = args . pop ( 0 ) handler = globals ( ) . get ( 'do_' + verb ) if handler is None : print ( "*** No handler for %r" % verb ) return 1 star , num_args = analyze_args ( handler ) if star : # Handler has *args, give it all the rest of the command line. handler_args = args args = [ ] else : # Handler has specific arguments, give it only what it needs. handler_args = args [ : num_args ] args = args [ num_args : ] ret = handler ( * handler_args ) # If a handler returns a failure-like value, stop. if ret : return ret