Re: csv Parser Question - Handling of Double Quotes

2008-03-28 Thread Aaron Watters
On Mar 27, 6:00 pm, John Machin <[EMAIL PROTECTED]> wrote: > ...The Python csv module emulates Excel in delivering garbage silently in > cases when the expected serialisation protocol has (detectably) not > been followed Fine, but I'd say the heuristic adopted produces bizarre and surprising r

Re: csv Parser Question - Handling of Double Quotes

2008-03-27 Thread John Machin
On Mar 28, 8:40 am, [EMAIL PROTECTED] wrote: > On Mar 27, 1:53 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: > > > > > En Thu, 27 Mar 2008 17:37:33 -0300, Aaron Watters > > <[EMAIL PROTECTED]> escribió: > > > >> "this";"is";"a";"test" > > > >> Resulting in an output of: > > > >> ['this', 'is

Re: csv Parser Question - Handling of Double Quotes

2008-03-27 Thread John Machin
On Mar 28, 7:37 am, Aaron Watters <[EMAIL PROTECTED]> wrote: > > If you want fame and admiration you could fix > the arguably bug in the csv module and send > the patch to the python bugs mailing list. > However, I just had a perusal of csv.py > good luck :). It is *NOT* a bug in the Python CS

Re: csv Parser Question - Handling of Double Quotes

2008-03-27 Thread jwbrown77
On Mar 27, 1:53 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Thu, 27 Mar 2008 17:37:33 -0300, Aaron Watters   > <[EMAIL PROTECTED]> escribió: > > > > >> "this";"is";"a";"test" > > >> Resulting in an output of: > > >> ['this', 'is', 'a', 'test'] > > >> However, if I modify the csv to: > >

Re: csv Parser Question - Handling of Double Quotes

2008-03-27 Thread Gabriel Genellina
En Thu, 27 Mar 2008 17:37:33 -0300, Aaron Watters <[EMAIL PROTECTED]> escribió: >> "this";"is";"a";"test" >> >> Resulting in an output of: >> >> ['this', 'is', 'a', 'test'] >> >> However, if I modify the csv to: >> >> "t"h"is";"is";"a";"test" >> >> The output changes to: >> >> ['th"is"', 'is', '

Re: csv Parser Question - Handling of Double Quotes

2008-03-27 Thread Aaron Watters
> "this";"is";"a";"test" > > Resulting in an output of: > > ['this', 'is', 'a', 'test'] > > However, if I modify the csv to: > > "t"h"is";"is";"a";"test" > > The output changes to: > > ['th"is"', 'is', 'a', 'test'] I'd be tempted to say that this is a bug, except that I think the definition of "c

csv Parser Question - Handling of Double Quotes

2008-03-27 Thread jwbrown77
Hello, I am trying to read a csv file. I have the following functioning code: BEGIN import csv reader = csv.reader(open("test.csv", "rb"), delimiter=';') for row in reader: print row END This code will successfully parse my csv file formatted as such: "this";"is";"a";"t