Exporting Richly Formatted Text In Python

Today, I wondered whether I could automatically save an image of colored text from the Python console. I was looking for a way to display very long strings that automatically wrapped to its container, so I avoided the dreaded run-on string that never ends. Also, could I save the image elegantly with high resolution? In this article, I will discuss potential approaches for getting a file with nice-looking colored text that can be programmatically generated. ...

October 7, 2020 · 5 min