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

Class _Switch

source code

_AbstractParameter --+

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) source code
Return the value of this option for the commandline.
source code
Method Details [hide private]

__init__(self, names, description)

source code 
Overrides: _AbstractParameter.__init__

(Informal representation operator)

source code 

Return the value of this option for the commandline.

Includes a trailing space.

Overrides: _AbstractParameter.__str__