Show More
@@ -256,10 +256,20 b' class Text(list):' | |||
|
256 | 256 | for part in self.format(styled): |
|
257 | 257 | stream.write(part) |
|
258 | 258 | |
|
259 | def __xrepr__(self, mode="default"): | |
|
259 | ||
|
260 | try: | |
|
261 | from IPython.Extensions import ipipe | |
|
262 | except ImportError: | |
|
263 | pass | |
|
264 | else: | |
|
265 | def xrepr_astyle_text(self, mode="default"): | |
|
260 | 266 | yield (-1, True) |
|
261 | 267 | for info in self: |
|
262 | 268 | yield info |
|
269 | try: | |
|
270 | ipipe.xrepr.when_type(Text)(xrepr_astyle_text) | |
|
271 | except Exception: | |
|
272 | pass | |
|
263 | 273 | |
|
264 | 274 | |
|
265 | 275 | def streamstyle(stream, styled=None): |
General Comments 0
You need to be logged in to leave comments.
Login now