Module Synopsis.getoptions

Classes Summary:
references
source code
Functions Summary:
  parse_option(arg)
references
source code
The required format is '--option[=[arg]]' or 'option=arg'.
  get_options(args, parse_arg = parse_option, expect_non_options = True)
references
source code
provide an iterator over the options in args.
Functions Details:
  parse_option(arg)
references
source code
The required format is '--option[=[arg]]' or 'option=arg'. In the former case the optional argument is interpreted as a string (only '--option' sets the value to True, '--option=' sets it to the empty string), in the latter case the argument is evaluated as a python expression. Returns (None, None) for non-option argument
  get_options(args, parse_arg = parse_option, expect_non_options = True)
references
source code
provide an iterator over the options in args. All found options are stripped, such that args will contain the remainder, i.e. non-option arguments. Pass each argument to the parse_option function to extract the (name,value) pair. Returns as soon as the first non-option argument was detected.