tobiah wrote: > John Machin wrote: > > tobiah wrote: > > > >> Of course, fixing the csv file takes a little more work. It sounds like > >> the > >> test lines given were just one of the fields, and there are > >> the quotes to worry about. > >> > > [snip] > >> But then this fails if there are commas in the > >> data. I could split and join on '","' but then > >> that fails when 'x' is either the first or last field. > >> > >> Are there tools in the csv module that make this > >> easier? > > > > There are no "tools". The main (whole?) purpose of the csv module is to > > intelligently handle the embedded comma and embedded quote problems on > > both input and output. May I suggest that you read the documentation? > > > > If you read the entire thread, you may find that I am > not deserving of a condescending reply. >
I did read the whole thread. I have read it again. I find that given a question of the form "are there tools in the X module ...", a response suggesting that you read the documentation and failing re.search("F", response, re.I) is not unreasonable. "condescending" is your inference, not my implication. Cheers, John -- http://mail.python.org/mailman/listinfo/python-list