Friday, February 19, 2021

Python tips: print() text in color

Found a simple approach to print() text in color for Python REPL:

To make some of your text more readable, you can use ANSI escape codes to change the colour of the text output in your python program. A good use case for this is to to highlight errors.
~ read here: ozzmaker - Add Colour to Text in Python

Test on Raspberry Pi/Thonny with interpreter of MicroPython on Raspberry Pi Pico:



No comments: