Package gavo :: Package grammars :: Module common :: Class FileRowIterator
[frames] | no frames]

Class FileRowIterator

source code

 object --+    
          |    
RowIterator --+
              |
             FileRowIterator
Known Subclasses:

is a RowIterator base for RowIterators reading files.

It analyzes the sourceToken to see if it's a string, in which case it opens it as a file name and leaves the file object in self.inputFile.

Otherwise, it assumes sourceToken already is a file object and binds it to self.inputFile. It then tries to come up with a sensible designation for sourceToken.

It also inspects the parent grammar for a gunzip attribute. If it is present and true, the input file will be unzipped transparently.

Instance Methods
 
__init__(self, grammar, sourceToken, **kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature
source code

Inherited from RowIterator: __iter__, getLocator, getParameters

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables

Inherited from RowIterator: notify

Properties

Inherited from RowIterator: recordNumber

Inherited from object: __class__

Method Details

__init__(self, grammar, sourceToken, **kwargs)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)