use pprint.PrettyPrinter intead of pprint.pformat