Including excerpts of another program output #1455
Unanswered
beldy-cola
asked this question in
Q&A
Replies: 1 comment
-
You are in luck. There is an undocumented AnsiDecoder class which will convert ansi codes in Rich's Text objects. |
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.
-
I am building an application with Rich.
Now I want to launch a 3rd party program in a subprocess and capture its output to show some bits of it in my application. The 3rd party program has ansi colored output which helps a lot with grasping it so I would like to retain.
Is there a way to print colored excerpts right away using Rich builtins?
Of course I can build a simple parser to convert ANSI codes to Rich formatting but I would like not to do so unless there is no easy way to use Rich tools as I think my code will be really bad and slow.
Beta Was this translation helpful? Give feedback.
All reactions