wgwgyh
wgwgyh

Reputation: 1

Colorama not working as expected while using init and Fore

I had installed the colorama libary and was writing it in python 3.12 . Then, I tried to use colorama but it didn't work as expected.

First of course, I imported init and Fore. Then I typed init().After that I wroted print(Fore.RED +"some red text"). It gave this random string of words and letters. [31msome red text After reading some posts, I used init(convert=True). Still, the color did not change. I would like to find a way to bypass this bug quickly.

Upvotes: 0

Views: 151

Answers (1)

user26564149
user26564149

Reputation: 11

Try this. Sometimes converting init type of colors included in colorama wont work, same thing for me. Enjoy!

from colorama import init, Fore, Back, Style

init(convert=True)

print(Fore.RED + 'some red text')

Upvotes: 1

Related Questions