Package Bio :: Module ParserSupport :: Class TaggingConsumer
[hide private]
[frames] | no frames]

Class TaggingConsumer

source code

      object --+    
               |    
AbstractConsumer --+
                   |
                  TaggingConsumer

Debugging consumer which tags data with the event and logs it.

This is a Consumer that tags the data stream with the event and prints it to a handle. Useful for debugging.

Instance Methods [hide private]
 
__init__(self, handle=None, colwidth=15, maxwidth=80)
Initialize.
source code
 
unhandled_section(self) source code
 
unhandled(self, data) source code
 
_print_name(self, name, data=None) source code
 
__getattr__(self, attr) source code

Inherited from AbstractConsumer (private): _unhandled, _unhandled_section

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, handle=None, colwidth=15, maxwidth=80)
(Constructor)

source code 

Initialize.

Arguments:
  • handle to log to, defaults to sys.stdout
  • colwidth for logging to the handle
  • maxwidth for truncation when logging
Overrides: object.__init__

__getattr__(self, attr)
(Qualification operator)

source code 
Overrides: AbstractConsumer.__getattr__