Package netaddr :: Module core :: Class PrettyPrinter
[frames] | no frames]

Class PrettyPrinter

source code

object --+    
         |    
Subscriber --+
             |
            PrettyPrinter

Concrete Subscriber that uses the pprint module to format all data from updates received writing them to any file-like object. Useful for debugging.

Instance Methods
 
__init__(self, fh=_sys.stdout, write_eol=True)
Constructor.
source code
 
update(self, data)
Callback function used by Publisher to notify this Subscriber about an update.
source code

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

Properties

Inherited from object: __class__

Method Details

__init__(self, fh=_sys.stdout, write_eol=True)
(Constructor)

source code 

Constructor.

fh - file or file like object to write to. Default: sys.stdout.

Overrides: object.__init__

update(self, data)

source code 

Callback function used by Publisher to notify this Subscriber about an update.

Overrides: Subscriber.update