Home | Trees | Index | Help |
---|
Package svnmailer :: Module cli :: Class OptionHelper |
|
object
--+
|
OptionHelper
Option parser helper class
Additional operations are delegated to this class in order to not pollute the OptionParser namespace which changes all the time.
Method Summary | |
---|---|
Initialization | |
Adds the behavior options group | |
Adds the common options group | |
Adds the possible options to the parser | |
Adds the supplemental options | |
Delocalizes the supplied paths | |
Ensures that all required options are present | |
Evaluates the --background option | |
list |
Parses the command line according to old style rules |
optparse.OptionContainer |
Fixes up the parsed option to match the needs of the mailer |
str |
Returns the formatted old style help |
Inherited from object | |
x.__delattr__('name') <==> del x.name... | |
x.__getattribute__('name') <==> x.name... | |
x.__hash__() <==> hash(x)... | |
helper for pickle... | |
helper for pickle... | |
x.__repr__() <==> repr(x)... | |
x.__setattr__('name', value) <==> x.name = value... | |
x.__str__() <==> str(x)... | |
Inherited from type | |
T.__new__(S, ...) -> a new object with type S, a subtype of T... |
Instance Variable Summary | |
---|---|
bool | _background : Is daemonizing of the process allowed? |
OptionParser |
_parser : The OptionParser instance |
list | args : The argument list to parse |
Class Variable Summary | |
---|---|
str | _WIN32_BG_ARG : fixed argument which is appended to the command
line of the background process on Win32 |
Titles | |
str | _BEHAVIOR_TITLE : Title of the behavior option group |
str | _COMMON_TITLE : Title of the common option group |
str | _SUPPLEMENTAL_TITLE : Title of the supplemental option group |
Constraints | |
tuple | _PATH_OPTIONS : List of option attributes that need to be
treated as localized paths. |
tuple | _REQUIRED_OPTIONS : List of option attributes that are required
under certain circumstances. |
Mapping Tables | |
dict | _OLD_OPTIONS : Mapping table for old style command lines (< svn
1.2) |
dict | _OLD_OPTIONS_1_2 : Mapping table for old style command lines (>=
svn 1.2 only) |
Method Details |
---|
__init__(self,
parser,
background)
Initialization |
_addBehaviorOptions(self)Adds the behavior options group |
_addCommonOptions(self)Adds the common options group |
_addOptions(self)Adds the possible options to the parser |
_addSupplementalOptions(self)Adds the supplemental options |
_delocalize(self, options)Delocalizes the supplied paths
|
_ensureRequired(self, options)Ensures that all required options are present
|
_handleBackground(self, options)Evaluates the --background option If daemonizing is not allowed, this method is a noop at all. Otherwise the behaviour depends on the platform:
|
_transformArgs(self, args)Parses the command line according to old style rules
|
fixUp(self, (options, fixed))Fixes up the parsed option to match the needs of the mailer
|
formatOldStyle(self, width)Returns the formatted old style help
|
Instance Variable Details |
---|
_backgroundIs daemonizing of the process allowed?
|
_parserTheOptionParser instance
|
argsThe argument list to parse
|
Class Variable Details |
---|
_BEHAVIOR_TITLETitle of the behavior option group
|
_COMMON_TITLETitle of the common option group
|
_OLD_OPTIONS_1_2Mapping table for old style command lines (>= svn 1.2 only)
|
_PATH_OPTIONSList of option attributes that need to be treated as localized paths. Every entry is a tuple consisting of the option attribute name the option name for the error message. ((('name', 'option'), ...))
|
_REQUIRED_OPTIONSList of option attributes that are required under certain circumstances. Every entry is a tuple consisting of the option attribute name, the list of mailer modes (or None for all modes) and an error text hint. ((('name', (mode, ...), 'text'), ...))
|
_SUPPLEMENTAL_TITLETitle of the supplemental option group
|
_WIN32_BG_ARGfixed argument which is appended to the command line of the background process on Win32
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.0 on Sun Sep 25 20:49:06 2005 | http://epydoc.sf.net |