'Waiting' animation in command prompt (Python)
A loading bar useful for if you're installing something.
animation = ["[ ]","[= ]","[=== ]","[==== ]","[===== ]","[====== ]","[======= ]","[========]","[ =======]","[ ======]","[ =====]","[ ====]","[ ===]","[ ==]","[ =]","[ ]","[ ]"]notcomplete = Truei = 0while notcomplete: print(animation[i % len(animation)], end='\r') time.sleep(.1) i += 1
if you want to make it last a couple seconds do
if i == 17*10: break
after the
i += 1