Package autodesk_toxik :: Package utils :: Module utils :: Class ArgumentParser
[frames] | no frames]

Class ArgumentParser

optparse.OptionContainer --+    
                           |    
       optparse.OptionParser --+
                               |
                              ArgumentParser

Extension of optparse.OptionParser which adds the notion of required arguments (this is a variant of an example of 'Extending optparse' from www.python.org).

Instance Methods
 
check_values(self, values, args)
check_values(values : Values, args : [string]) -> (values : Values, args : [string])
 
add_required_arg(self, *args, **kwargs)

Inherited from optparse.OptionParser: __init__, add_option_group, destroy, disable_interspersed_args, enable_interspersed_args, error, exit, expand_prog_name, format_epilog, format_help, format_option_help, get_default_values, get_description, get_option_group, get_prog_name, get_usage, get_version, parse_args, print_help, print_usage, print_version, set_default, set_defaults, set_process_default_values, set_usage

Inherited from optparse.OptionContainer: add_option, add_options, format_description, get_option, has_option, remove_option, set_conflict_handler, set_description

Class Variables

Inherited from optparse.OptionParser: standard_option_list

Method Details

check_values(self, values, args)

 

check_values(values : Values, args : [string]) -> (values : Values, args : [string])

Check that the supplied option values and leftover arguments are valid. Returns the option values and leftover arguments (possibly adjusted, possibly completely new -- whatever you like). Default implementation just returns the passed-in values; subclasses may override as desired.

Overrides: optparse.OptionParser.check_values
(inherited documentation)