pprint
index
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pprint.py
Module Docs

Support to pretty-print lists, tuples, & dictionaries recursively.
 
Very simple, but useful, especially in debugging data structures.
 
Classes
-------
 
PrettyPrinter()
    Handle pretty-printing operations onto a stream using a configured
    set of formatting parameters.
 
Functions
---------
 
pformat()
    Format a Python object into a pretty-printed representation.
 
pprint()
    Pretty-print a Python object to a stream [default is sys.stdout].
 
saferepr()
    Generate a 'standard' repr()-like value, but protect against recursive
    data structures.

 
Modules
       
sys
warnings

 
Classes
       
PrettyPrinter

 
class PrettyPrinter
     Methods defined here:
__init__(self, indent=1, width=80, depth=None, stream=None)
Handle pretty printing operations onto a stream using a set of
configured parameters.
 
indent
    Number of spaces to indent for each level of nesting.
 
width
    Attempted maximum number of columns in the output.
 
depth
    The maximum depth to print out nested structures.
 
stream
    The desired output stream.  If omitted (or false), the standard
    output stream available at construction will be used.
format(self, object, context, maxlevels, level)
Format object for a specific context, returning a string
and flags indicating whether the representation is 'readable'
and whether the object represents a recursive construct.
isreadable(self, object)
isrecursive(self, object)
pformat(self, object)
pprint(self, object)

 
Functions
       
isreadable(object)
Determine if saferepr(object) is readable by eval().
isrecursive(object)
Determine if object requires a recursive representation.
pformat(object, indent=1, width=80, depth=None)
Format a Python object into a pretty-printed representation.
pprint(object, stream=None, indent=1, width=80, depth=None)
Pretty-print a Python object to a stream [default is sys.stdout].
saferepr(object)
Version of repr() which can handle recursive data structures.

 
Data
        __all__ = ['pprint', 'pformat', 'isreadable', 'isrecursive', 'saferepr', 'PrettyPrinter']