Looping a script

I am a newbie in programming and I started working with Sikuli open source package and uses Python language.

I would like my image match finding script posted below to repeat from the beginning once it reaches the end without user intervention. Here is what I have and the last line I commented, but its empty as far as repeating the script line codes?

def captureLeftSmallest(): # capture the image to search # we have to try to get the smallest capture possible # since the probe and the target have different positions # this can be set fixed, if it is always the same # find the bottom of image greyBelow = "1354183324452-1.png" g = left.find(greyBelow)#g.highlight(1) while True: g1 = g.above(sbHeight-g.y) g1.x -= 4; g1.w += 8 g1 = g1.exists(greyBelow) if not g1: break g = g1#g.highlight(1) b = g.y

found = checkCells(capture(left))if not found: for i in range(numCells - 1): symbol = captureSymbol(i) found = checkCells(symbol, i+1) if found: breakif not found: print "not found"; exit(1)click(found)type(Key.TAB,KEY_CTRL)#Wait for counter on Surfbar to reach Zerowait(1)