Much of my MR research is quite computationally expensive so there are many times that I have been sitting wondering how many times through a certain loop I have been. Enter progressbar. It is a nice small package which allows me to see, quite nicely, where I am in my loop.
Here is an example of what I typically do:
[cc lang="python"]
from progressbar import ProgressBar, Percentage, Bar, ETA
coords = array( numpy.nonzero( _data[-1] > thresh ) ).transpose()
pbar = ProgressBar(widgets=['Calc Offset Map ', Percentage(), Bar(), ETA()], maxval=coords.shape[0]).start()
for ii,coord in enumerate(coords):
# some big calculation here
pbar.update(ii)
pbar.finish()
[/cc]
This gives me a really nice, informative and pleasing text progressbar.