Back to index

python-biopython  1.60
Public Member Functions | Private Attributes
Bio.SeqIO.SffIO._AddTellHandle Class Reference

List of all members.

Public Member Functions

def __init__
def read
def tell
def seek
def close

Private Attributes

 _handle
 _offset

Detailed Description

Wrapper for handles which do not support the tell method (PRIVATE).

Intended for use with things like network handles where tell (and reverse
seek) are not supported. The SFF file needs to track the current offset in
order to deal with the index block.

Definition at line 722 of file SffIO.py.


Constructor & Destructor Documentation

def Bio.SeqIO.SffIO._AddTellHandle.__init__ (   self,
  handle 
)

Definition at line 729 of file SffIO.py.

00729 
00730     def __init__(self, handle):
00731         self._handle = handle
00732         self._offset = 0


Member Function Documentation

Definition at line 746 of file SffIO.py.

00746 
00747     def close(self):
00748         return self._handle.close()
00749 
00750 
#This is a generator function!

Here is the caller graph for this function:

def Bio.SeqIO.SffIO._AddTellHandle.read (   self,
  length 
)

Definition at line 733 of file SffIO.py.

00733 
00734     def read(self, length):
00735         data = self._handle.read(length)
00736         self._offset += len(data)
00737         return data

def Bio.SeqIO.SffIO._AddTellHandle.seek (   self,
  offset 
)

Definition at line 741 of file SffIO.py.

00741 
00742     def seek(self, offset):
00743         if offset < self._offset:
00744             raise RunTimeError("Can't seek backwards")
00745         self._handle.read(offset - self._offset)

Definition at line 738 of file SffIO.py.

00738 
00739     def tell(self):
00740         return self._offset


Member Data Documentation

Definition at line 730 of file SffIO.py.

Definition at line 731 of file SffIO.py.


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