You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I couldn't find any relevant issues for me, or at least I did not see the connection.
Describe the bug
When in a Live display, and when printing onto a console with Console.print(..., markup=True), the live will sometimes be rendered without markup as well, causing visual flicker.
Minimum working example:
importrandomimporttimefromrich.consoleimportConsolefromrich.liveimportLiveconsole=Console()
withLive(console=console, refresh_per_second=4) aslive:
whileTrue:
time.sleep(0.1)
rdm=random.random()
# This text should be printed raw or with markup in bold, depending on rdm.live.console.print("[bold]Some text[/bold]", markup=Trueifrdm>=0.5elseFalse)
# This text should be updated each cycle, but *always* with markup.live.update(f"[green]Random:[/green] {rdm}")
I would expect that "markup=True" only affects the text I am using it with, and not the live.
I thought that maybe one can stop the live, print the text without markup, and start the live again afterwards, but this doesn't work. If there are other means of synchronization, then I am not ware of them...
I would be very grateful for help or any workaround.
Platform
Click to expand
Platform Info
chris@i61nb083 ~ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bionic
chris@i61nb083 ~ uname -a
Linux i61nb083 5.4.0-126-generic #142~18.04.1-Ubuntu SMP Thu Sep 1 16:25:16 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
chris@i61nb083 ~ python --version
Python 3.6.9
I couldn't find any relevant issues for me, or at least I did not see the connection.
Describe the bug
When in a
Live
display, and when printing onto a console withConsole.print(..., markup=True)
, the live will sometimes be rendered without markup as well, causing visual flicker.Minimum working example:
I would expect that "markup=True" only affects the text I am using it with, and not the live.
I thought that maybe one can stop the live, print the text without markup, and start the live again afterwards, but this doesn't work. If there are other means of synchronization, then I am not ware of them...
I would be very grateful for help or any workaround.
Platform
Click to expand
Platform Info
Output of
python -m rich.diagnose
Output of
pip freeze | grep rich
The text was updated successfully, but these errors were encountered: