Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/entity-framework/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 使用clint进度条显示urllib.urlretrieve()的状态_Python_Iterator_Urllib_Clint - Fatal编程技术网

Python 使用clint进度条显示urllib.urlretrieve()的状态

Python 使用clint进度条显示urllib.urlretrieve()的状态,python,iterator,urllib,clint,Python,Iterator,Urllib,Clint,进度条基于迭代器。 urllib.urlretrieve()有一个回调,报告区块下载完成。 每次调用回调时,我是否可以将迭代器设置在某个位置?查看,我发现它只会上升。要从特定值开始,请使用: for i in progress.dots(range(your_start_value)): pass 要退格,请尝试: sys.stderr.write(' \b\b' * amount); sys.stderr.flush() 如果不使用colorama模块的定位功能,这可能是行不通的,在这种情

进度条基于迭代器。
urllib.urlretrieve()有一个回调,报告区块下载完成。
每次调用回调时,我是否可以将迭代器设置在某个位置?

查看,我发现它只会上升。要从特定值开始,请使用:

for i in progress.dots(range(your_start_value)): pass
要退格,请尝试:

sys.stderr.write(' \b\b' * amount); sys.stderr.flush()
如果不使用
colorama
模块的定位功能,这可能是行不通的,在这种情况下,最好只写(“=”*percent\u done+”“*percent\u left”)