0

I'm have windows 10.

I'm can print colored text in windows without any module? (like colorama) if I run:

GREEN =  '\033[32m' 
print (GREEN + "This is some green text!")

then I got ←[32mThis is some green text!

why?

Ch3steR
  • 20,090
  • 4
  • 28
  • 58

1 Answers1

0

Vanilla cmd.exe doesn't support ANSI escapes. Either use another terminal app (such as Windows Terminal, Conemu or Cmder) or see How to make win32 console recognize ANSI/VT100 escape sequences? to turn on ANSI in vanilla cmd.

SuperStormer
  • 4,997
  • 5
  • 25
  • 35
  • thanks. i was run this code to windows terminal and get colored text. –  Feb 25 '21 at 18:36