我是python新手,正在编写一些脚本来自动从FTP服务器下载文件等。我想显示下载的进度,但我希望它保持在相同的位置,例如:
输出:
Downloading File FooFile.txt [47%]
我尽量避免这样的事情:
Downloading File FooFile.txt [47%]
Downloading File FooFile.txt [48%]
Downloading File FooFile.txt [49%]
我该怎么做呢?
重复:How can I print over the current line in a command line application?
使用终端处理库,如curses module:
Python2
我喜欢以下几点:
演示:
Python3
演示:
您还可以使用回车:
相关问题 更多 >
编程相关推荐