Split with python

tobiah st at tobiah.org
Wed Aug 30 14:20:48 EDT 2006


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.

-- 
Posted via a free Usenet account from http://www.teranews.com




More information about the Python-list mailing list