I have a Python script which processes a .txt file which contains report usage information. I\'d like to find a way to cleanly print the attributes of an object using pprint\'s
For pretty-printing objects which contain other objects, etc. pprint is not enough. Try IPython's lib.pretty, which is based on a Ruby module.
pprint
from IPython.lib.pretty import pprint pprint(complex_object)