Slow printing strings with color? #1213
Replies: 1 comment 1 reply
-
from time import sleep
from rich.console import Console
from rich.text import Text
text = Text.from_markup("[b]slow[/b] [magenta]printing[/magenta] for [u]Tetraslam")
console = Console()
for c in text:
console.print(c, end="")
sleep(0.1) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Tetraslam
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.
-
Is it possible to slowly print a string with colors and/or bold/underline/italics? I know you can slow print using the
sys
module:However I'd also like to add colors to the text when it gets slow-printed, but right now I'm not able to figure out if there is an in-built function in rich to do both simultaneously on one string. If it doesn't exist, I think it would be a nice feature to include!
Beta Was this translation helpful? Give feedback.
All reactions