Given these statements...
rows=db(db.colortable.color!=None).select()
print rows
...that return something like this...
colortable.color
red
green
blue
How can 'rows' (a SQLRows object) be converted to a list like this...
colorlist=['red','green','blue']
...such that 'print colorlist' would produce this output...
['red','green','blue']
This sorta works, but not quite...
colorlist=[]
for r in rows: colorlist.append(r)
When printed it looks like this...
for i in colorlist: print i
<SQLStorage {'color': 'red'}>
<SQLStorage {'color': 'green'}>
<SQLStorage {'color': 'blue'}>
Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---