Created
October 5, 2016 10:06
-
-
Save RDCH106/6562cc7136b30a5c59628501d87906f7 to your computer and use it in GitHub Desktop.
ANSI Colors Fix for Python in Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import platform | |
if os.name == 'nt' and platform.release() == '10' and platform.version() >= '10.0.14393': | |
# Fix ANSI color in Windows 10 version 10.0.14393 (Windows Anniversary Update) | |
import ctypes | |
kernel32 = ctypes.windll.kernel32 | |
kernel32.SetConsoleMode(kernel32.GetStdHandle(-11), 7) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Explicación detallada en:
http://mascandobits.es/tips/corregir-colores-ansi-en-la-consola-de-windows-10-tras-la-actualizacion-windows-anniversary/