Replies: 1 comment
-
To answer my own question: Captured content cannot be printed with console.print(). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
On Windows system with following demo code:
(rich version 12.5.1)
The captured content is not printed correctly.
In "Command Prompt" and "Windows Terminal" (images added)
the print with console directly will produce the yellow and green colors but the captured content will print with the control codes.
Cmd:

Windows Terminal:

On Git Bash console (MINGW64) colors are not printed at all BUT when
force_terminal=True
is used with Console object the direct prints are still colorless but the capture does actually have the red color.(force-terminal=True)

What might be happening here?
Having those color codes on screen for captured content does not look good.
Beta Was this translation helpful? Give feedback.
All reactions