好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

python的urllib模块显示下载进度示例

代码如下:


def report_hook(count, block_size, total_size):
... print '%02d%%'%(100.0 * count * block_size/ total_size)
...
urllib.urlretrieve("http://sports.sina测试数据.cn/", reporthook= report_hook)
00%
01%
03%
...

查看更多关于python的urllib模块显示下载进度示例的详细内容...

  阅读:55次