2
0

prettyprinter.py 295 B

1234567
  1. import pprint
  2. class prettyPrinter(pprint.PrettyPrinter):
  3. def format(self, object, context, maxlevels, level):
  4. if isinstance(object, unicode):
  5. return (object.encode('utf8'), True, False)
  6. return pprint.PrettyPrinter.format(self, object, context, maxlevels, level)