Rich and Pyboxen¶
Rich¶
We can format the console using a very powerful library, Rich https://rich.readthedocs.io/en/latest/index.html.
For a more pretty traceback:
A range of templates are available in Rich's GitHub repo here.
PyBoxen¶
PyBoxen is built on Rich and provides quick boxes - https://github.com/savioxavier/pyboxen.
from pyboxen import boxen
print(
boxen(
"Titles and subtitles!",
title="Hello, [black on cyan] World [/]",
subtitle="Cool subtitle goes here",
subtitle_alignment="center",
color="yellow",
padding=1,
)
)