Package logilab :: Package common :: Module optparser :: Class OptionParser

[frames] | no frames]

# Class OptionParser

source code

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

Instance Methods

__init__(self, *args, **kwargs) | source code

add_command(self, name, mod_or_funcs, help='') name of the command, name of module or tuple of functions... | source code

print_main_help(self) | source code

parse_command(self, args) | source code

Inherited from `optparse.OptionParser`: `add_option_group`, `check_values`, `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

### __init__(self, *args, **kwargs)
(Constructor)

source code

Overrides: optparse.OptionContainer.__init__

### add_command(self, name, mod_or_funcs, help='')

source code

    name of the command, name of module or tuple of functions
    (run, add_options)