-
-
Couldn't load subscription status.
- Fork 1.4k
Open
Labels
p4-enhancement-future 🧨On the back burnerOn the back burner
Description
Hello !
I am having issues with the usage of a carriage return with tqdm.write()
This code works perfectly, it make an animation of a spinning bar
for x in range (0,50):
tqdm.write("|/-\\"[x % 4], end='\r')
time.sleep(0.1)But if I create progress bar just before :
bar = tqdm(total=100) # Here
for x in range (0,50):
tqdm.write("|/-\\"[x % 4], end='\r')
time.sleep(0.1)I have just a display of the progress bar.
This is an issue imo because the tqdm.write should emule the behaviour of print() since nothing is precised in the documentation.
Edit :
This problem can be generalized to any value of the end argument that is not \n
(Made some test running both programs with a space or an other character instead of the return carriage. The first code shows the expected output but the second have exactly the same issue)
Metadata
Metadata
Assignees
Labels
p4-enhancement-future 🧨On the back burnerOn the back burner