Guest User

Untitled

a guest
Feb 17th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. import sys,time
  2.  
  3. for i in range(49):
  4. space=(50-i)*'-'
  5. load_num=float(i*2)
  6. i='█'*i
  7. loading='|{}{}| {}% Complete'.format(i,space,load_num)
  8. sys.stdout.write(loading)
  9. sys.stdout.flush()
  10. time.sleep(0.08)
  11. for _ in range(len(loading)):
  12. sys.stdout.write('\033[D \033[D')
  13. sys.stdout.flush()
Add Comment
Please, Sign In to add comment