4Suite™ API Documentation

# ► Module Ft.Lib.CommandLine.FancyGetOpt

Advanced argument & option processing for command-line scripts

    Copyright 2004 Fourthought, Inc. (USA).
    Detailed license and copyright information: http://4suite.org/COPYRIGHT
    Project home, documentation, distributions: http://4suite.org/

Functions: FancyGetopt

## Functions

FancyGetopt(cmd, option_table, args)
  Parses command line options and parameter list. args is the argument list to be parsed, without the leading reference to the running program. Typically, this means "sys.argv[1:]". option_table is an instance of Ft.Lib.CommandLine.Options.Options. Raises an exception if args contains syntax errors. Returns a tuple of (options, args) where options is a dictionary and args is the list of args after the first arg that wasn't in option_table. Note the options return value is different than what getopt.getopt() returns.

      cmd is an Ft.Lib.CommandLine.Command instance, and is only used
      in reporting errors.