I'm trying to create a loading text that alternates between "Loading", "Loading.", "Loading..", "Loading...", and "Loading...." while updating the previous entry. I found similar situations online that use either sys.stdout
or a \r
end to the print function but have had no luck with either
The code i'm using is:
import time
tick = 0
while True:
print("Loading" + "." * tick, end="\r")
if tick < 4:
tick += 1
time.sleep(0.4)
else:
tick = 0
The output I'm getting is:
LoadingLoading.Loading..Loading...Loading....LoadingLoading.Loading..Loading...
until I force quit the execution. i haven't seen the problem mentioned in other threads but if anyone has any idea what might be causing the issue I'd be VERY grateful.