Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. # !/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. import time
  4.  
  5. STEPS = [
  6. "⡿",
  7. "⣟",
  8. "⣯",
  9. "⣷",
  10. "⣾",
  11. "⣽",
  12. "⣻",
  13. "⢿",
  14. ]
  15.  
  16.  
  17. def loading(seconds):
  18. i = 0
  19. while i < 10*seconds:
  20. char = STEPS[i % len(STEPS)]
  21. print(f"\rLoading... {char}", end="", flush=True)
  22. time.sleep(0.1)
  23. i += 1
  24.  
  25.  
  26. if __name__ == "__main__":
  27. loading(5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement