标签:proc out pre rate process 下载 roc color 字符串操作
import sys def processBar(num, total): rate = num / total rate_num = int(rate * 100) if rate_num == 100: r = ‘\r%s>%d%%\n‘ % (‘=‘ * rate_num, rate_num,) else: r = ‘\r%s>%d%%‘ % (‘=‘ * rate_num, rate_num,) sys.stdout.write(r) sys.stdout.flush processBar(10,100)
标签:proc out pre rate process 下载 roc color 字符串操作
原文地址:https://www.cnblogs.com/kuraki/p/9571531.html