姬長信(Redy)

下载Python 3的进度条


我需要在Python 3的文件下载过程中显示进度.
我在Stackoverflow上看到了一些主题,但考虑到我是编程的菜鸟,没有人发布完整的例子,只是它的一小部分,或者我可以在Python 3上工作的那个,没有一个对我有好处. .

附加信息:

好的,所以我有这个:

from urllib.request import urlopen
import configparser
#checks for files which need to be downloaded
print('    Downloading...')
file = urlopen(file_url)
#progress bar here
output = open('downloaded_file.py','wb')
output.write(file.read())
output.close()
os.system('downloaded_file.py')

脚本通过python命令行运行