随笔分类 -  Python

python related technologies
一个简单的python downloader
摘要:import urllib2,urllibclass myDownloader: def download(self,url, filename=""): def reporthook(block_count, block_size, file_size): if file_size ==-1: print "can't determine the file size, now retrived", block_count*block_size else: percentage =int((block_count*block_size*100.0 阅读全文
posted @ 2011-05-18 15:45 RobotAll 阅读(848) 评论(0) 推荐(0)