【发布时间】:2010-10-05 18:02:36
【问题描述】:
我是python新手,正在编写一些脚本来自动从FTP服务器等下载文件。我想显示下载的进度,但我希望它保持在同一个位置,例如:
输出:
下载文件 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?
【问题讨论】:
-
您可能对这个易于使用的模块感兴趣,它是一个文本进度条。 pypi.python.org/pypi/progressbar/2.2
标签: python console-output