Hello, Does anybody know how to build a list using set (or any other) command ? I would like to read stuff from database and store it in a list using just Zope and without building long string and then parsing it using split command... Thanx Dejan Kulpinski Sierra Systems Consultants Inc.
"Kulpinski, Dejan" wrote:
Does anybody know how to build a list using set (or any other) command ? I would like to read stuff from database and store it in a list using just Zope and without building long string and then parsing it using split command...
<dtml-call "REQUEST.set('myvar', [])"> ... <dtml-call "myvar.append(v)"> You can also use dtml-let or dtml-with "_(myvar=[])" to get the list started, and standard list methods like extend and insert to build it. How are you getting your data, though? If it's from a SQL DA, then the entire dataset comes already nicely packaged in an object which you can treat as a list of lists. Evan
participants (2)
-
Evan Simpson -
Kulpinski, Dejan