I often have time consuming processing steps that occur within a loop. The following method is how I keep track of where the processing is at. Is there a more elegant, Pythonic way of counting processing data while a script is running?
n_items = [x for x in range(0,100)]
counter = 1
for r in n_items:
# Perform some time consuming task...
print "%s of %s items have been processed" % (counter, len(n_items))
counter = counter + 1