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

Class _Switch

source code

_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 by which the parameter can be
referenced (ie. ["-a", "--append", "append"]). The first name in
the list is considered to be the one that goes on the commandline,
for those parameters that print the option. The last name in the list
is assumed to be a "human readable" name describing the option in one
word.

o description -- a description of the option.

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

__init__(self, names, description)
(Constructor)

source code 
Overrides: _AbstractParameter.__init__

__str__(self)
(Informal representation operator)

source code 
Return the value of this option for the commandline.

Includes a trailing space.

Overrides: _AbstractParameter.__str__