python - Why does termcolor output control characters instead of colored text in the Windows console? -


I have just installed Windows on Python 2.7. When I try to print colorful text, I get color code instead.

color color color ('text text text', 'red')

Here is the result:

< P> Screenshot of the Windows console window along the line: & quot; ← 31 Amtext Text Text ← [0 M & quot;

I still get the same results on the manager and when I tried to run the script as a standalone application.

 
& gt; & Gt; & Gt; From Term-Color Import * & gt; & Gt; & Gt; Cprint ('Hello', 'Red') ← [31 Malmö ← [0m & gt; & Gt; & Gt; Import Rangema & gt; & Gt; & Gt; Colorama.init () & gt; & Gt; & Gt; Cprint ('Hello', 'Red') Hello & lt; - Red & gt; & Gt; & Gt;

Comments