0

When I input something like:

print('\x1b[6;30;42m' + 'Success!' + '\x1b[0m')

the output I get is:

enter image description here

With no color.

I've heard you any need to enable vt100 emulation for windows, but when I search for how to do that, I haven't seen any answers.

All answers are very appreciated!

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Anderson P
  • 107
  • 1
  • 11
  • See the answer where the termcolor module is suggested: http://stackoverflow.com/questions/22886353/printing-colors-in-python-terminal – unpythonic Jan 22 '17 at 03:22

1 Answers1

-1
    printf("\033[1;42m Success! \033[0m \n");

    color as below:
    none = "\033[0m"
    black = "\033[0;30m"
    dark_gray = "\033[1;30m"
    blue = "\033[0;34m"
    light_blue = "\033[1;34m"
    green = "\033[0;32m"
    light_green -= "\033[1;32m"
    cyan = "\033[0;36m"
    light_cyan = "\033[1;36m"
    red = "\033[0;31m"
    light_red = "\033[1;31m"
    purple = "\033[0;35m"
    light_purple = "\033[1;35m"
    brown = "\033[0;33m"
    yellow = "\033[1;33m"
    light_gray = "\033[0;37m"
    white = "\033[1;37m"