set_width for console #1262
-
Using either an IPython console or a Jupyter notebook/lab, I often find that the default width is too wide. I defined a simple def set_width(width):
console_instance._width = width which I use in interactive sessions. This works perfectly for my use case. However, I know that accessing private variables (hidden behind a read-only property) is definitely not good practice, but I could not find any other way to update the parameters of an active console. Am I missing a more acceptable way to achieve the same result? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
The next version of Rich will have a property setter for width and height. In the meantime, I forgive you for accessing a private variable! It won't break. |
Beta Was this translation helpful? Give feedback.
The next version of Rich will have a property setter for width and height. In the meantime, I forgive you for accessing a private variable! It won't break.