Closed Serfentum closed 4 years ago
Hi. This indeed looks odd, but apparently expected, as "autoreset" resets the colors after each print
argument. In your case, the code prints to the terminal:
Green (reset), 'Some text' (reset)
and this is why "Some text" is printed without the green color. Try using:
print(Fore.GREEN + 'Some text', sep='')
Thank you very much, I missed it!
Hi! I'm really sorry, can't understand why my shell works in such way, but when I write code like this
And run it in my terminal there is no colors at all( If I don't set autoreset to True and reset style manually (via Fore.RESET) it works fine except burden of manual style resetting. What's wrong with my approach? In pycharm code with
colorama.init(autoreset=True, convert=False, strip=False)
works ok - it outputs colored textI have ubuntu 16.04 and GNOME Terminal 3.18.3, thank you very much!