2

I've seen some libs print things via warning or error stream (e.g. tqdm), and the text is shown in red.

So my question is: How to print arbitrary text like that? I plan to highlight some stdout info in my code.

Flicic
  • 109
  • 8

1 Answers1

4

Is this what you want?

from colorama import Fore

print(Fore.RED + 'This is a warning!')