<p>我是python新手,正在编写一些脚本来自动从FTP服务器下载文件等。我想显示下载的进度,但我希望它保持在相同的位置,例如:</p>
<p>输出:</p>
<blockquote>
<p>Downloading File FooFile.txt [47%]</p>
</blockquote>
<p>我尽量避免这样的事情:</p>
<pre><code> Downloading File FooFile.txt [47%]
Downloading File FooFile.txt [48%]
Downloading File FooFile.txt [49%]
</code></pre>
<p>我该怎么做呢?</p>
<hr/>
<p><strong>重复</strong>:<a href="https://stackoverflow.com/questions/465348/how-can-i-print-over-the-current-line-in-a-command-line-application/465360#465360">How can I print over the current line in a command line application?</a></p>