def enable_vt_mode(filehandle=None):
if filehandle is None:<EOL><INDENT>filehandle = msvcrt.get_osfhandle(sys.__stdout__.fileno())<EOL><DEDENT>current_mode = wintypes.DWORD()<EOL>KERNEL32.GetConsoleMode(filehandle, ctypes.byref(current_mode))<EOL>new_mode = <NUM_LIT> | current_mode.value<EOL>KERNEL32.SetConsoleMode(filehandle, new_mode)<EOL>
Enables virtual terminal processing mode for the given console or stdout