如何在命令行应用程序中通过当前行打印? [英] How can I print over the current line in a command line application?
本文介绍了如何在命令行应用程序中通过当前行打印?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Unix上,我可以使用\r(回车)或\b(backspace)打印已经在shell中可见的文本(即重写当前行)。
On Unix, I can either use \r (carriage return) or \b (backspace) to print over text already visible in the shell (i.e. overwrite the current line again).
我可以通过Python脚本在Windows命令行中实现相同的效果吗?
Can I achieve the same effect in a Windows command line from a Python script?
我试过curses模块,
I tried the curses module but it doesn't seem to be available on Windows.
推荐答案
查看此处
这里为窗口上的python的curses库...
here too for a curses library for python on windows...
这篇关于如何在命令行应用程序中通过当前行打印?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文