colorama是python第三方库中一个可以改变输出流颜色的玩意儿, 安装可以通过:
pip install colorama
简单介绍
from colorama import Fore, Back, Style
for color in ['GREEN', 'RED', 'BLUE', 'YELLOW', 'WHITE']:
print getattr(Fore, color), "It's color will be", color
print getattr(Back, color), "It's color will be", color
print Style.RESET_ALL
查看内部的详情
官方文档:colorama