On Aug 27, 9:42 pm, Andreas Waldenburger <[email protected]>
wrote:
> On Thu, 27 Aug 2009 21:36:28 +0200 Andreas Waldenburger
>
> <[email protected]> wrote:
> > [snip]
>
> > Might I humbly suggest
>
> > >>> sheet = list(spamReader) # ?
>
> Oh, and while I'm humbly suggesting:
>
> spam_reader instead of spamReader or SpamReader or SpamrEadeR or
> suchlike. Caps are "reserved" for classes.
>
> Not a necessity, of course. But it's the dialect around these parts.
>
> /W
>
> --
> INVALID? DE!
Thank you for your answers. Let me however make some comments:
1- the csv file was generated with Excel 2007; no prompts for what the
separator should be; Excel has used ";" by default, without asking
anything
2- about capitalisation, I used the var "spamReader" because I just
copy/pasted from the official python site:
http://docs.python.org/library/csv.html
3- when I try
>>> sheet = [row for row in spamReader]
>>> print sheet
[]
all I get is an empty list; something seems not to be working properly
Same result list: I get an empty list
sheet = list(spamReader)
Thank you again for your help, which is highly appreciated.
Vicente Soler
--
http://mail.python.org/mailman/listinfo/python-list