Login and get codingIn this Bite you will spice up your command line apps with a loader animation.
You will use
itertools.cycle
andsys.stdout
to make the following terminal spinner animation:
Apart from the module imports we already defined
SPINNER_STATES
andSTATE_TRANSITION_TIME
= the amount of time to pause between states. Hopefully this will make it a bit easier.One last hint is to look at how to flush terminal output so states you print to stdout don't get concatenated.
Good luck and keep calm and code in Python!
148 out of 150 users completed this Bite.
Will you be Pythonista #149 to crack this Bite?
Resolution time: ~48 min. (avg. submissions of 5-240 min.)
Pythonistas rate this Bite 4.7 on a 1-10 difficulty scale.
» Up for a challenge? 💪