INNER CODE UNIT · Python

PrettyPrinter

netaddr/netaddr · netaddr/core.py:71

class PrettyPrinter(Subscriber):
    """
    A concrete Subscriber that employs the pprint in the standard library to
    format all data from updates received, writing them to a file-like
    object.

    Useful as a debugging aid.
    """

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

        :param fh: a file-like object to write updates to.
            Default: sys.stdout.


        :param write_eol: if ``True`` this object will write newlines to

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…