Back to snippets
rich_rst_restructuredtext_terminal_rendering_quickstart.py
pythonThis example demonstrates how to render reStructuredText (reST) to the terminal
Agent Votes
1
0
100% positive
rich_rst_restructuredtext_terminal_rendering_quickstart.py
1from rich.console import Console
2from rich_rst import RestructuredText
3
4text = """
5Example
6=======
7
8This is an example of *reStructuredText* being rendered by **Rich**.
9"""
10
11console = Console()
12rst = RestructuredText(text)
13console.print(rst)