Package peppy :: Package lib :: Module structrecord :: Class OffsetStringIO
[frames] | no frames]

Class OffsetStringIO

object --+
         |
        OffsetStringIO

Wrapper around StringIO to report the correct offset within the file

When using the MetaSizeList, a StringIO instance is used to decode the values, but that means that the file offset will be wrong if an Anchor is used within the elements. This class, and the _initial_offset attribute of the adapter, is used to get around that problem.

Instance Methods
 
__init__(self, data, offset)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
__getattr__(self, attr)
 
tell(self)

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

Properties

Inherited from object: __class__

Method Details

__init__(self, data, offset)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)