This module provides any dynamically loadable code for the OptParse Framework Extension such as hook and handler registration. Additional classes and functions exist in cement2.lib.ext_optparse.
OptParse Framework Extension Library.
This class implements the IArgument interface, and sub-classes from optparse.OptionParser. Please reference the optparse documentation for full usage of the class.
Arguments and Keyword arguments are passed directly to OptionParser on initialization.
Add an argument to the parser. Arguments and keyword arguments are passed directly to OptionParser.add_option().
Parse a list of arguments, and store them as self.parsed_args which is an object. Meaning an argument name of ‘foo’ will be stored as self.parsed_args.foo.
Required Arguments:
- arg_list
- A list of arguments (generally sys.argv) to be parsed.
Returns: self.parsed_args (object)