3

I am using Rich Live, and whenever the things which are printed are more than the height of my console, Rich just shows me an ellipsis, and I have to set Live's vertical_overflow to "visible." This will show my prints live, but it will print everything multiple times instead of once which makes the console messy.

My code is much more complex, but the sample looks like this:

from rich.live import Live
from rich.console import Console, Group
from time import sleep

group = Group()
with Live(console=Console()) as live:
    for i in range(100):
        group = Group(*group.renderables, "{}".format(i))
        if i == 50:
            sleep(10)
        live.update(group)

vertical_overflow="ellipsis"

and when vertical_overflow="visible":

vertical_overflow="visible"

It will just print until the application finishes.

Can anyone help me with how I can print live without facing overflow?

0 Answers0