Python module to enable ANSI colors for stdout on Windows?
问题 I am looking for a Python module that would add ANSI support under Windows. This means that after importing the module, if you output ANSI escaped strings, they will appear accordingly. 回答1: There are two python modules that are able to do this colorama and tendo.ansiterm module, which was originally written for waf. By initial tests indicate that colorama is more mature, even if it requires two lines of code instead of one. import sys try: import colorama colorama.init() except: try: import