As given in an answer on Print in terminal with colors using Python? , I am trying to print in color on console/terminal using following code:
RED = "e[31m"
NORMAL = "e[0m"
print("TESTING")
print(RED+"TESTING"+NORMAL)
print("TESTING")
However, it is not working and only giving following output:
TESTING
e[31mTESTINGe[0m # IN BLACK, THOUGH IT IS SHOWING COLOR HERE.
TESTING
Where is the problem and how can it be solved? I am using Python version 3.5.3 on Debian Stable Linux.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…