mbreese/eta — pull request #3 by FurongPeng (2014-05-12 08:39:15+00:00)
Title: the problem with current position

If the time span between two calls of print_status is too small, the current position is not correct.
For example:

from eta import ETA
import time
eta = ETA(100)
for i in xrange(100):
eta.print_status(overwrite=False)
time.sleep(0.01)
eta.done()

the output is :
########################################
1.0% | 0:00 [> ] ETA:
2.0% / 0:00 [> ] ETA:
3.0% - 0:00 [> ] ETA:
4.0% \ 0:00 [> ] ETA:
5.0% | 0:00 [=> ] ETA:
Done! (0:01)

If we replace eta.print_status(overwrite=False) with eta.print_status(i,overwrite=False) then it we can get the correct output.
########################################
0.0% | 0:00 [> ] ETA:
20.0% / 0:00 [====> ] ETA:
40.0% - 0:00 [========> ] ETA:
60.0% \ 0:00 [============> ] ETA:
80.0% | 0:00 [================> ] ETA:
Done! (0:01)

In ETA, I think the variable i is used for holding current position. So, I make the variable i to keep the correct position.