Package wsatools :: Module CLI :: Class CLI :: Class Argument
[hide private]

Class Argument

source code


A program argument definition.

Instance Methods [hide private]
 
__init__(self, name, example, isOptional=False, isValOK=<function <lambda> at 0x290ec08>)
Define this argument.
source code
 
__cmp__(self, other)
Compare on name (for removing etc.).
source code
str
__str__(self)
Returns: Argument's name.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, example, isOptional=False, isValOK=<function <lambda> at 0x290ec08>)
(Constructor)

source code 

Define this argument.

Parameters:
  • name (str) - Single word name of argument for look-up table, example usage help string.
  • example (str) - Example value for argument for help string, also default value if argument is optional.
  • isOptional (bool) - If True, then this argument does not need to be supplied and the example becomes the default.
  • isValOK (function) - A function to test if the supplied value is formatted correctly, of the form "bool f(x)".
Overrides: object.__init__

__str__(self)
(Informal representation operator)

source code 

str(x)

Returns: str
Argument's name.
Overrides: object.__str__