I just want to check the the number of treated lines during program running. (I treat txt file with about million lines.)
to check the number of treated lines during running time, I use this code below
lineCnt = 0
for line in lines:
lineCnt += 1
if lineCnt % 2500 == 0:
sys.stdout.write('.')
if lineCnt % 100000 == 0:
print("")
I expected printing 1 dot on screen when 2500 lines are treated. but, I just can see printing 40 dots at same time. when 100000 lines are treated.
how can i fix it to get the result exactly what I want? T.T