-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Milestone
Description
The following example script output is quite messed up on Python 2.7:
from tqdm import tqdm, trange
from time import sleep
for i in trange(10, desc='outer'):
for j in trange(10, desc='inner'):
# Print using tqdm class method .write()
sleep(0.1)
if not (j % 3):
tqdm.write("Done task %i.%i" % (i,j))
The issue seems to be the code that locates other instances sharing the same underlying fp -- on Python 2, this gets wrapped by SimpleTextIOWrapper, so then the comparisons of the fps with each other and with stdout never succeed, and the 'clear' code doesn't execute.