python-timer

A wrapper for long-running tasks that iterate over many things, printing friendly 'percentage done' messages to standard error.


License
MIT
Install
pip install python-timer==0.22

Documentation

python-timer

a wrapper for long-running tasks that iterate over many things, printing friendly 'percentage done' messages to standard error.

import timer
for stuff in timer.show_progress(range(100)):
    # .... analysis here
    timer.sleep(.5)

prints (to standard error) :

: 0.1 min elapsed, 25.0 % done, ETA:   0.3 min
: 0.1 min elapsed, 45.0 % done, ETA:   0.3 min
: 0.2 min elapsed, 65.0 % done, ETA:   0.3 min
: 0.3 min elapsed, 85.0 % done, ETA:   0.3 min

install

Now available on the python-package-index. To install, just type pip install python-timer from the command-line.