Created
February 20, 2020 16:20
-
-
Save mazhar266/04b29e300cddedb8763bb2c8e0a7acb4 to your computer and use it in GitHub Desktop.
Animation in shell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import sys | |
animation = "ππππππππ" | |
for i in range(100): | |
time.sleep(0.1) | |
sys.stdout.write("\r" + animation[i % len(animation)]) | |
sys.stdout.flush() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment