Newbie query - reading text file (with column headings) into dictionary

Mel Wilson mwilson at the-wire.com
Mon Dec 9 09:11:08 EST 2002


In article <x7adjgra5m.fsf at guru.mired.org>, Mike Meyer <mwm at mired.org> wrote:
>"Andy Elvey" <andy.elvey at paradise.net.nz> writes:
>> Mike Meyer <mwm at mired.org> wrote in message
>Personally, I don't think this belongs in a cookbook, because it
>slices the data in an unusual direction.
> [ ... ]                     However, you're more likely to want to
>deal with a line as an individual object than a column. [ ... ]

   I just found that accessing an ADO Recordset through
win32com returns data in just this 'wierd' order:  a tuple
of columns.  My reaction was the same as yours:

rows = zip (*recordset.GetRows())

        Regards.        Mel.



More information about the Python-list mailing list