Not sure if this is what you are looking for, but you can run enumerate on range and get the position in your iteration:
In [1]: for index, i in enumerate(xrange(10, 15)): ...: print index + 1, i ...: ...: 1 10 2 11 3 12 4 13 5 14
In this case, index + 1 will represent the current point being created ( index itself will be the total number of points created at the beginning of this iteration). Also, if you use Python 2.x, xrange usually better suited for these types of iterations, since it does not load the entire list into memory, but rather accesses it as needed.
Rocketkey
source share