ANSI 转义码在我的电脑上不起作用

问题描述

我正在尝试打印前几行。为此,我尝试使用 ANSI 代码“\033[A”,但没有用。在说 print("\033[A") 的行中,它将打印 this。但是几个月前,当我使用 "\033[A" 时它起作用了。 注意:我没有更新python。 这是一个示例代码:

print("This should be erased")
print("This should not be erased")
print("\033[A"*2)
print("Erased")

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)