Like `pretty` but print to stdout.
(obj, verbose=False, max_width=79, newline='\n', max_seq_length=MAX_SEQ_LENGTH)
| 162 | |
| 163 | |
| 164 | def pprint(obj, verbose=False, max_width=79, newline='\n', max_seq_length=MAX_SEQ_LENGTH): |
| 165 | """ |
| 166 | Like `pretty` but print to stdout. |
| 167 | """ |
| 168 | printer = RepresentationPrinter(sys.stdout, verbose, max_width, newline, max_seq_length=max_seq_length) |
| 169 | printer.pretty(obj) |
| 170 | printer.flush() |
| 171 | sys.stdout.write(newline) |
| 172 | sys.stdout.flush() |
| 173 | |
| 174 | |
| 175 | class _PrettyPrinterBase: |