pprint
index
/usr/lib/python2.2/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.

 
Modules
            
sys
 
Classes
            
PrettyPrinter
 
class PrettyPrinter
       
   Methods defined here:
_PrettyPrinter__format = __format(self, object, stream, indent, allowance, context, level)
_PrettyPrinter__repr = __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)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'pprint'
 
Functions
            
StringIO(...)
StringIO([s]) -- Return a StringIO-like stream for reading or writing
_commajoin = join(...)
S.join(sequence) -> string
 
Return a string which is the concatenation of the strings in the
sequence.  The separator between elements is S.
_id = id(...)
id(object) -> integer
 
Return the identity of an object.  This is guaranteed to be unique among
simultaneously existing objects.  (Hint: it's the object's memory address.)
_len = len(...)
len(object) -> integer
 
Return the number of items of a sequence or mapping.
_perfcheck(object=None)
_recursion(object)
_safe_repr(object, context, maxlevels, level)
isreadable(object)
Determine if saferepr(object) is readable by eval().
isrecursive(object)
Determine if object requires a recursive representation.
pformat(object)
Format a Python object into a pretty-printed representation.
pprint(object, stream=None)
Pretty-print a Python object to a stream [default is sys.sydout].
saferepr(object)
Version of repr() which can handle recursive data structures.
 
Data
             __all__ = ['pprint', 'pformat', 'isreadable', 'isrecursive', 'saferepr', 'PrettyPrinter']
__file__ = '/usr/lib/python2.2/pprint.pyc'
__name__ = 'pprint'
_sys_modules = {'BaseHTTPServer': <module 'BaseHTTPServer' from '/usr/lib/python2.2/BaseHTTPServer.pyc'>, 'Bastion': <module 'Bastion' from '/usr/lib/python2.2/Bastion.pyc'>, 'CGIHTTPServer': <module 'CGIHTTPServer' from '/usr/lib/python2.2/CGIHTTPServer.pyc'>, 'ConfigParser': <module 'ConfigParser' from '/usr/lib/python2.2/ConfigParser.pyc'>, 'Cookie': <module 'Cookie' from '/usr/lib/python2.2/Cookie.pyc'>, 'FCNTL': <module 'FCNTL' from '/usr/lib/python2.2/FCNTL.pyc'>, 'HTMLParser': <module 'HTMLParser' from '/usr/lib/python2.2/HTMLParser.pyc'>, 'MimeWriter': <module 'MimeWriter' from '/usr/lib/python2.2/MimeWriter.pyc'>, 'SimpleHTTPServer': <module 'SimpleHTTPServer' from '/usr/lib/python2.2/SimpleHTTPServer.pyc'>, 'SocketServer': <module 'SocketServer' from '/usr/lib/python2.2/SocketServer.pyc'>, ...}