0

Trying to print colored text on Windows (using Python), the escape sequence prints a left arrow instead of the color.

print('\033[1;34mblue\033[1;m')

Result:←[1;34mblue←[1;m

Is there some terminal setting I need to get this to work? Is there another straightforward way in Python to print color so that the same code works for both Windows and Linux?

Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105
jbemt48
  • 409
  • 2
  • 7
  • 13
  • Better duplicate target: [Python: How can I make the ANSI escape codes to work also in Windows?](http://stackoverflow.com/q/12492810/3821804) – GingerPlusPlus Jan 18 '16 at 15:47
  • Both of these posts suggest using colorama, which seems to work, so gonna go with with it. – jbemt48 Jan 19 '16 at 00:30

0 Answers0