xoutil.pprint – Extension to the data pretty printer.

This modules includes all the Python’s standard library features in module pprint and adds the function ppformat(), which just returns a string of the pretty-formatted object.

New in version 1.4.1.

xoutil.pprint.ppformat(obj)[source]

Just like pprint() but always returns the result instead of writing it to a stream.

Returns:The pretty formated text.
Return type:unicode in Python 2, str in Python 3.