如何在 Windows 11 上使用 python 和 termcolor 在控制台应用程序中输出颜色

问题描述 投票:0回答:0

我最近从 Windows 10 切换到 Windows 11。 以前我已经使用 termcolor 包的“colored”函数编写了我的 python 代码来为输出着色。为了让它在 Win10 上运行,我必须按照 here.

中的说明向注册表中添加一些内容

现在我已经切换到 Win11,我的代码不再以彩色打印出来,但是它也没有默认返回打印相应的 ASCII 字符。

有人知道如何在 Win11 上为 termcolor 启用彩色输出吗?

非常感谢!

python console-application windows-11 termcolor
© www.soinside.com 2019 - 2024. All rights reserved.