Package Bio :: Package Application :: Class _Switch
[hide private]
[frames] | no frames]

Class _Switch

source code

        object --+    
                 |    
_AbstractParameter --+
                     |
                    _Switch

Represent an optional argument switch for a program.

This holds UNIXish options like -kimura in clustalw which don't take a value, they are either included in the command string or omitted.

o names -- a list of string names (typically two entries) by which the parameter can be set via the legacy set_parameter method (eg ["-a", "--append", "append"]). The first name in list is used when building the command line. The last name in the list is a "human readable" name describing the option in one word. This must be a valid Python identifer as it is used as the property name and as a keyword argument, and should therefore follow PEP8 naming.

o description -- a description of the option. This is used as the property docstring.

o is_set -- if the parameter has been set

NOTE - There is no value attribute, see is_set instead,

Instance Methods [hide private]
 
__init__(self, names, description)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__str__(self)
Return the value of this option for the commandline.
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, names, description)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

Return the value of this option for the commandline.

Includes a trailing space.

Overrides: object.__str__