0

why this python color codes are not working in windows os?

class bcolors: GREEN = '\033[92m' YELLOW = '\033[93m' RED = '\033[91m' PINK = '\033[95m' BLUE = '\033[94m' BOLD = '\033[1m' ENDC = '\033[0m' print(bcolors.BLUE+"Hello World") # working fine in Linux terminal

26th May 2021, 3:13 PM
Ratnapal Shende
Ratnapal Shende - avatar
3 Answers
+ 1
26th May 2021, 3:28 PM
The future is now thanks to science
The future is now thanks to science - avatar
+ 1
The future is now thanks to science[INACTIVE] not working in windows operating system on python shell as well as inside cmd when I run code showing some weired ANSI chars
26th May 2021, 3:36 PM
Ratnapal Shende
Ratnapal Shende - avatar
+ 1
1. Use Visual Studio code or pycharm 2. Use colorama module in python for better performance ####### steps to install module######### 1. open CMD 2. type - pip install colorama
26th May 2021, 3:49 PM
Sarvesh Karanjkar
Sarvesh Karanjkar - avatar