Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
Bio.PopGen.GenePop.Controller._FileIterator Class Reference

List of all members.

Public Member Functions

def __init__
def __iter__
def next
def __del__

Public Attributes


Detailed Description

Iterator which crawls over a stream of lines with a function.

   The generator function is expected to yield a tuple, while
   consuming input

Definition at line 139 of file

Constructor & Destructor Documentation

def Bio.PopGen.GenePop.Controller._FileIterator.__init__ (   self,

Definition at line 145 of file

00146     def __init__(self, func, stream, fname):
00147         self.func = func
00148 = stream
00149         self.fname = fname
00150         self.done = False

Definition at line 160 of file

00161     def __del__(self):
00163         try:
00164             os.remove(self.fname)
00165         except OSError:
00166             #Jython seems to call the iterator twice
00167             pass

Member Function Documentation

Definition at line 151 of file

00152     def __iter__(self):
00153         if self.done:
00154             self.done = True
00155             raise StopIteration
00156         return self

Here is the caller graph for this function:

Definition at line 157 of file

00158     def next(self):
00159         return self.func(self)

Member Data Documentation

Definition at line 149 of file

Definition at line 148 of file

Definition at line 146 of file

Definition at line 147 of file

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