#用于动态更新百分比数据 print("\r 占用 %.2f%%"%(Rate*100),end='') # 格式化成2016-03-20 11:45:39形式 print time . strftime ( "%Y-%m-%d %H:%M:%S" , time . localtime ())