pprint
index
/usr/lib/python1.5/pprint.py
 

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.sydout].
 
saferepr()
    Generate a 'standard' repr()-like value, but protect against recursive
    data structures.

   
Classes
                        
PrettyPrinter
_Recursion

   
class PrettyPrinter
              
__format(self, object, stream, indent, allowance, context, level)
__repr(self, object, context, level)
__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.
isreadable(self, object)
isrecursive(self, object)
pformat(self, object)
pprint(self, object)

   
class _Recursion
              
__init__(self, object)
__repr__(self)

   
Functions
                        
StringIO(...)
StringIO([s]) -- Return a StringIO-like stream for reading or writing

   
Constants
                        
DictType = <type 'dictionary'>
ListType = <type 'list'>
TupleType = <type 'tuple'>