Re: SQLSoup results and zip
"Jonathan Ellis" <[email protected]> Mon, 05 Feb 2007 14:15:21 -0800
| Newsgroups | gmane.comp.python.spyce.general |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 5 Feb 2007 15:21:34 -0400, "Christopher Clarke" <cclarke-wYfHrJ5eQDBWk0Htik3J/[email protected]> said: > Hi All > I've taken the plunge and have started porting my database stuff to > sqlsoup > A problem i've encountered is that sometimes i need to get a "column" > from a list or results > so i do a res=zip(*mycur.fetchall()) and res[0] is the first column > etc. > How do i replicate this in SQLSoup? > when i try for example > res=mydb.intraday.select(mydb.intraday.c.symbol=='RBTT', > order_by=[desc > (mydb.intraday.c.trade_date)]) > zip(*res) i get > TypeError: zip argument #1 must support iteration Is something like [row.columnname for row in res] what you are looking for? ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642