Package csb :: Package io :: Class EntryReader
[frames] | no frames]

Class EntryReader

source code

object --+
         |
        EntryReader

Generic flatfile reader. Provides efficient iterable interface over the entries in the specified stream.

Instance Methods
 
__del__(self) source code
 
__init__(self, stream, start_marker, end_marker=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
generator
entries(self)
Return an iterator over all entries from the stream/flat file.
source code
list
readall(self)
Return a list of all entries in the stream.
source code

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

Properties
  end_marker
  start_marker

Inherited from object: __class__

Method Details

__init__(self, stream, start_marker, end_marker=None)
(Constructor)

source code 

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

Parameters:
  • stream (file) - the source data stream to read
  • start_marker (str) - a string marker which marks the beginning of a new entry
  • end_marker (str, None) - a string marker which signals the end of the file
Overrides: object.__init__
(inherited documentation)

entries(self)

source code 

Return an iterator over all entries from the stream/flat file.

Returns: generator
iterable over all entries read from the stream

Property Details

end_marker

Get Method:
unreachable.end_marker(self)
Set Method:
unreachable.end_marker(self, value)

start_marker

Get Method:
unreachable.start_marker(self)
Set Method:
unreachable.start_marker(self, value)