Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
Bio.Application._Switch Class Reference
Inheritance diagram for Bio.Application._Switch:
Inheritance graph
[legend]
Collaboration diagram for Bio.Application._Switch:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __str__

Public Attributes

 names
 description
 is_set
 is_required

Detailed Description

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,

Definition at line 523 of file __init__.py.


Constructor & Destructor Documentation

def Bio.Application._Switch.__init__ (   self,
  names,
  description 
)

Definition at line 543 of file __init__.py.

00543 
00544     def __init__(self, names, description):
00545         self.names = names
00546         self.description = description
00547         self.is_set = False
00548         self.is_required = False

Here is the caller graph for this function:


Member Function Documentation

Return the value of this option for the commandline.

Includes a trailing space.

Reimplemented from Bio.Application._AbstractParameter.

Definition at line 549 of file __init__.py.

00549 
00550     def __str__(self):
00551         """Return the value of this option for the commandline.
00552 
00553         Includes a trailing space.
00554         """
00555         assert not hasattr(self, "value")
00556         if self.is_set:
00557             return "%s " % self.names[0]
00558         else:
00559             return ""

Here is the caller graph for this function:


Member Data Documentation

Definition at line 545 of file __init__.py.

Definition at line 547 of file __init__.py.

Definition at line 546 of file __init__.py.

Definition at line 544 of file __init__.py.


The documentation for this class was generated from the following file: