[ZPT] Re: a little more on scripts execution
Peter C. Norton
spacey-zope@lenin.nu
Sun, 11 Aug 2002 20:28:35 -0700
Is there a way to make a loop structure using templates to do roughly
the following in python:
>>> loop = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
>>> i = 0
>>> while i < len(loop):
... print loop[i]
... i = i+1
... print ("Yeah and one %d" % loop[i])
... i = i + 1
...
I'm asking because I've got a folder with images in it, and I'd like
for those images to be put into a table that's 3 colums wide. I can't
see a way to increment the list in a "repeat" clause to do the above.
What's the right way to approach this sort of thing?
--
The 5 year plan:
In five years we'll make up another plan.
Or just re-use this one.