Python 彩色终端输出

来源:互联网 发布:餐饮软件2017排名 编辑:程序博客网 时间:2024/04/29 13:26
from colorama import init, Fore, Back, Styleif __name__ == "__main__":    init(autoreset=True)    #  初始化,并且设置颜色设置自动恢复    print(Fore.RED + 'some red text')    print(Back.GREEN + 'and with a green background')    print(Style.DIM + 'and in dim text')    print('back to normal now')
原创粉丝点击