Show More
@@ -83,12 +83,11 b' import types' | |||||
83 | import re |
|
83 | import re | |
84 | import datetime |
|
84 | import datetime | |
85 | from collections import deque |
|
85 | from collections import deque | |
|
86 | from io import StringIO | |||
86 |
|
87 | |||
87 | from IPython.utils.py3compat import PYPY, cast_unicode |
|
88 | from IPython.utils.py3compat import PYPY, cast_unicode | |
88 | from IPython.utils.encoding import get_stream_enc |
|
89 | from IPython.utils.encoding import get_stream_enc | |
89 |
|
90 | |||
90 | from io import StringIO |
|
|||
91 |
|
||||
92 |
|
91 | |||
93 | __all__ = ['pretty', 'pprint', 'PrettyPrinter', 'RepresentationPrinter', |
|
92 | __all__ = ['pretty', 'pprint', 'PrettyPrinter', 'RepresentationPrinter', | |
94 | 'for_type', 'for_type_by_name'] |
|
93 | 'for_type', 'for_type_by_name'] | |
@@ -114,7 +113,7 b" def pretty(obj, verbose=False, max_width=79, newline='\\n', max_seq_length=MAX_SE" | |||||
114 | """ |
|
113 | """ | |
115 | Pretty print the object's representation. |
|
114 | Pretty print the object's representation. | |
116 | """ |
|
115 | """ | |
117 |
stream = |
|
116 | stream = StringIO() | |
118 | printer = RepresentationPrinter(stream, verbose, max_width, newline, max_seq_length=max_seq_length) |
|
117 | printer = RepresentationPrinter(stream, verbose, max_width, newline, max_seq_length=max_seq_length) | |
119 | printer.pretty(obj) |
|
118 | printer.pretty(obj) | |
120 | printer.flush() |
|
119 | printer.flush() |
General Comments 0
You need to be logged in to leave comments.
Login now