import sys, time
for i in range(5):
sys.stdout.write('{0}/5\r'.format(i + 1))
sys.stdout.flush()
time.sleep(1)
import sys, time for i in range(5): sys.stdout.write(str(i) * (5 - i) + '\r') sys.stdout.flush() time.sleep(1)
import sys, time
for i in range(5):
sys.stdout.write(' ' * 10 + '\r')
sys.stdout.flush()
sys.stdout.write(str(i) * (5 - i) + '\r')
sys.stdout.flush()
time.sleep(1)
import sys, time
for i in range(5):
sys.stdout.write(' ' * 10 + '\r')
sys.stdout.flush()
print i
sys.stdout.write(str(i) * (5 - i) + '\r')
sys.stdout.flush()
time.sleep(1)
# -*- coding:utf-8 -*-
# Copyright: Lustralisk
# Author: Cedric Liu
# Date: 2015-11-08
import sys, time
class ProgressBar:
def __init__(self, count = 0, total = 0, width = 50):
self.count = count
self.total = total
self.width = width
def move(self):
self.count += 1
def log(self, s):
sys.stdout.write(' ' * (self.width + 9) + '\r')
sys.stdout.flush()
print s
progress = self.width * self.count / self.total
sys.stdout.write('{0:3}/{1:3}: '.format(self.count, self.total))
sys.stdout.write('#' * progress + '-' * (self.width - progress) + '\r')
if progress == self.width:
sys.stdout.write('\n')
sys.stdout.flush()
bar = ProgressBar(total = 10)
for i in range(10):
bar.move()
bar.log('We have arrived at: ' + str(i + 1))
time.sleep(1)
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有