Python + IIS/ASP questions (modules, namespaces, etc)
sismex01 at hebmex.com
sismex01 at hebmex.com
Thu Dec 19 17:43:41 EST 2002
> From: pibble at yahoo.com [mailto:pibble at yahoo.com]
> Sent: Thursday, December 19, 2002 1:17 PM
>
> [...snip...]
>
> So, now I am going to look at converting our Windows database code to
> using an ADO based module. One weird thing is that the
> RecordSet.GetRows function returns stuff in a weird (Columns, Rows)
> format, instead of the (Rows, Columns) that we need. My first pass at
> a python function to transform that is disappointingly slow.
>
Use zip to reorder your row/column data, to convert it
into a list of tuples [ (row1), (row2), ... ]:
zip(*ado.getrows()) -> list
It's fairly quick.
-gustavo
More information about the Python-list
mailing list