-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Console object failing to capture in a context manager #2172
Comments
Till update on Textualize/rich#2172
Till update on Textualize/rich#2172
Till update on Textualize/rich#2172
I can work around this change in behaviour, so happy for this issue to be closed. However, don't know if the change was intentional, so will leave to one of you to make the call. IIUC then here is the change that caused it: https://github.com/Textualize/rich/pull/2066/files#diff-8f507d88f3d034716fad069c6a73da25e2915a216a2bdda6db2e8d0c13a0020aL1968-L1970 |
Wanted to +1 this. I worked around it using |
This wasn't intentional, and I suspect we should restore the original behaviour. There are differing requirements with respect to capture. Some want the capture output to also go to the terminal, and some wan't no output. I think we should probably make it an option in capture, i.e. |
@willmcgugan that sounds reasonable. I've had the same need. CLI app where This discussion did make another thing come to mind... Currently when I need to do this I capture/save in a variable. When I go to display, I use |
Describe the bug
I might have been holding it wrong, but up until version
12.0.1
the following minimal example gave the expected output.Code:
Output:
''
Expected output:
'foo\n'
First appears in version
12.0.1
for me.Platform
Click to expand
Python 3.6.12 on Ubuntu 20.04
I may ask you to copy and paste the output of the following commands. It may save some time if you do it now.
If you're using Rich in a terminal:
rich==12.0.1
The text was updated successfully, but these errors were encountered: