Can pprint/pretty be temporarily be disabled? #1603
-
This question came as the result of an issue [1] filed in one of my projects. When using IPython (on its own), it is possible to toggle on and off the pretty printing. For example, doing
outputs names one at a time on a line. However, after turning off the pretty printing with the magic command
When using Rich with IPython, attempting to use the magic toggle In [5]: pretty.install() In [6]: %pprintAttributeError Traceback (most recent call last) AttributeError: 'BaseFormatter' object has no attribute 'pprint' Looking at the source code for Rich, this is not surprising since I can see that it monkeypatches IPython's code, substituting its own pretty printer. I am wondering if there is a way to (temporarily) disable Rich's pretty printer once it is installed. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
I'm sure it is possible. I'm assuming it is toggling |
Beta Was this translation helpful? Give feedback.
I'm sure it is possible. I'm assuming it is toggling
pprint
which is a boolean. I'll look in to it.