from colorama import init, Fore, Back, Style
if __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')
Python 彩色终端输出
最新推荐文章于 2023-03-24 15:14:13 发布