Python--シミュレーション進捗バー########


#!/usr/bin/python
# -*- coding:utf-8 -*-

import time
import sys

# print(sys.argv)  #      list,            

# print(sys.exit("goodbye"))  #    

# sys.version  #   python      
#
# sys.maxint  #     int 
#
# sys.path  #          
#
# sys.platform  #           

# sys.stdout.write("hello")        


for i in range(31):

    sys.stdout.write('\r')  #        

    sys.stdout.write("%s%% |%s" % (int(i/30*100), int(i/30*100)*'#'))

    sys.stdout.flush()     #        

    time.sleep(0.3)