Package svnmailer :: Module cli :: Class SvnmailerOptionParser
[hide private]

Class SvnmailerOptionParser

source code

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

Fully initialized option parser

Instance Methods [hide private]
 
__init__(self, *args, **kwargs)
Initialization
source code
 
parse_args(self, args=None, *other_args, **kwargs)
Accepts also the old command line
source code
 
error(self, msg)
We raise an exception instead of exiting
source code
 
get_version(self)
Returns the version string
source code
 
get_prog_name(self)
Returns the program name
source code
 
format_help(self, formatter=None)
Adds a description of the old style options
source code
int
_getTerminalWidth(self)
Returns terminal width if determined, None otherwise
source code
 
_initSvnmailer(self)
Builds the options from option groups
source code
 
_addSvnmailerCommonOptions(self)
Adds the common options group
source code
 
_addSvnmailerBehaviourOptions(self)
Adds the behaviour options group
source code
 
_addSvnmailerSupplementalOptions(self)
Adds the supplemental options
source code
list
_transformSvnmailerOldStyle(self, argv)
Parses the command line according to old style rules
source code

Inherited from optparse.OptionParser: add_option_group, check_values, destroy, disable_interspersed_args, enable_interspersed_args, exit, expand_prog_name, format_epilog, format_option_help, get_default_values, get_description, get_option_group, get_usage, print_help, print_usage, print_version, set_default, set_defaults, set_process_default_values, set_usage

Inherited from optparse.OptionParser (private): _add_help_option, _add_version_option, _create_option_list, _get_all_options, _get_args, _get_encoding, _init_parsing_state, _match_long_opt, _populate_option_list, _process_args, _process_long_opt, _process_short_opts

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

Inherited from optparse.OptionContainer (private): _check_conflict, _create_option_mappings, _share_option_mappings

Class Variables [hide private]

Inherited from optparse.OptionParser: standard_option_list

Instance Variables [hide private]
tuple _svn
The svn version
Method Details [hide private]

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

source code 

Initialization

Overrides: optparse.OptionContainer.__init__

parse_args(self, args=None, *other_args, **kwargs)

source code 

Accepts also the old command line

Overrides: optparse.OptionParser.parse_args

error(self, msg)

source code 

We raise an exception instead of exiting

Parameters:
  • msg (str) - The error message
Raises:
Overrides: optparse.OptionParser.error

get_version(self)

source code 

Returns the version string

Overrides: optparse.OptionParser.get_version

get_prog_name(self)

source code 

Returns the program name

Overrides: optparse.OptionParser.get_prog_name

format_help(self, formatter=None)

source code 

Adds a description of the old style options

Overrides: optparse.OptionContainer.format_help

_getTerminalWidth(self)

source code 

Returns terminal width if determined, None otherwise

Returns: int
The width

_transformSvnmailerOldStyle(self, argv)

source code 

Parses the command line according to old style rules

Parameters:
  • argv (list) - Command line list. If argv is None, sys.argv[1:] is evaluated instead
Returns: list
The commandline, possibly transformed to new style