标签:class turn stdout ott https position border 显示 time
def Schedule(a, b, c): """ 进度条显示 :param a:已经下载的数据块 :param b:数据块的大小 :param c:远程文件的大小 :return: """ per = 100.0 * a * b / c if per > 100: per = 100 sys.stdout.write(‘\r‘) sys.stdout.write(‘\t\t%.2f%% - 已下载的大小:%d - 文件大小:%d‘ % (per, a * b, c)) sys.stdout.flush() time.sleep(0.5) def run(): request.urlretrieve(‘https://***‘, ‘ttt‘, Schedule)
标签:class turn stdout ott https position border 显示 time
原文地址:https://www.cnblogs.com/haoxr/p/9007476.html