Get to Know the Rich Console
One neat feature of Rich is that you can add custom styles. As an example, you can add a style to warn the user that they’ve done something wrong. You do this by instantiating
Theme and passing it to
refresh_page() is tested, and you can see that it clears the screen before the Wyrdl headline is printed. Next, Look at me! is printed with the
warning style, red text on a yellow background.
Become a Member to join the conversation.