Re: [Zope] batching help

2005-12-19 Thread Nicolas Georgakopoulos
Thanks a lot , I did it with my 'ugly' way but that was exactly what I was looking for. cheers.. Martijn Pieters wrote: On 12/15/05, Nicolas Georgakopoulos [EMAIL PROTECTED] wrote: Hello all , I'm trying to display on the same page a table with (3 columns) with content from a list . I'm

Re: [Zope] batching help

2005-12-16 Thread Martijn Pieters
On 12/15/05, Nicolas Georgakopoulos [EMAIL PROTECTED] wrote: Hello all , I'm trying to display on the same page a table with (3 columns) with content from a list . I'm trying to batch the results so that every 3 elements anothe row is created. Can anyone give me a clue how to do that ? Use

Re: [Zope] batching help

2005-12-15 Thread Dragos Chirila
Hi I suggest to use the following function that def get_grouped_list(self, seq=[], size=3): #get the list with all items grouped return [seq[i:i+size] for i in range(0, len(seq), size)] that takes as parameter a list and goups items in slices with length = size. def

Re: [Zope] batching help

2005-12-15 Thread Nicolas Georgakopoulos
Dragos Chirila wrote: Hi I suggest to use the following function that def get_grouped_list(self, seq=[], size=3): #get the list with all items grouped return [seq[i:i+size] for i in range(0, len(seq), size)] that takes as parameter a list and goups items in slices with length =

Re: [Zope] batching help

2005-12-15 Thread J Cameron Cooper
Nicolas Georgakopoulos wrote: Dragos Chirila wrote: Hi I suggest to use the following function that def get_grouped_list(self, seq=[], size=3): #get the list with all items grouped return [seq[i:i+size] for i in range(0, len(seq), size)] that takes as parameter a list and goups