Closed AshwinNS closed 1 week ago
The issue was StreamingStdOutCallbackHandler()
is writing the first part and rich
is printing the second part. The solution was to redirect the rich
output to stderr and used contextlib.redirect_stdout
to redirect stdout
to a dummy stream.
I hope we solved your problem.
If you like using Rich, you might also enjoy Textual
Hi Team, first off all great package, wonderful work, kudos. I have a method which is returning a stream-able object and i'm using
for
loop to print the output to the console. here is a sample code.The problem I'm facing is when the output is printed it prints
unstyled
version and theMarkdown
formatted output too. i tried usingconsole.clean()
but it was clearing thequestion panels
too. here is an image of the terminal.what am i missing here, even if the
unstyled
data is o/p to terminal, is there a way to remove them once theMarkdown
version is displayed likeconsole.clean()
.