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
I think beeprint is what you need.
Just pip install beeprint and change your code to:
pip install beeprint
def __str__(self): from beeprint import pp return pp(self, output=False)