Re: csv.reader has trouble with comma inside quotes inside brackets

2009-06-09 Thread Bret
Thanks John, I didn't realize that the quotes were supposed to surround the entire field. I ended up making a quick script to replace comma's outside quotes with tabs. I was just trying to clean this crazy "csv" file to import into msyql. thanks again, bret -- http://mail.python.org/mailman/l

Re: csv.reader has trouble with comma inside quotes inside brackets

2009-06-09 Thread Terry Reedy
Bret wrote: i have a csv file like so: row1,field1,[field2][text in field2 "quote, quote"],field3,field row2,field1,[field2]text in field2 "quote, quote",field3,field using csv.reader to read the file, the first row is broken into two fields: [field2][text in field2 "quote and quote" while the

Re: csv.reader has trouble with comma inside quotes inside brackets

2009-06-09 Thread John Machin
Bret gmail.com> writes: > > i have a csv file like so: > row1,field1,[field2][text in field2 "quote, quote"],field3,field > row2,field1,[field2]text in field2 "quote, quote",field3,field > > using csv.reader to read the file, the first row is broken into two > fields: > [field2][text in field2