CSV ignores lineterminator

Jeffrey Barish jeffbarish at starband.net
Tue Apr 6 12:02:34 EDT 2004


Skip Montanaro wrote:

> 
>     Jeffrey> Yes, I expect your example to work because each entry in
>     the Jeffrey> list defines a "line" regardless of csv:
>     ...
>     Jeffrey> In my example, the first "line" of the list is
>     Jeffrey> 'word1\tword2;word3\tword4'.  What I expect to happen is
>     that Jeffrey> the list passes the entire line to csv.reader(),
>     which then Jeffrey> splits off 'word1\tword2' as the first line by
>     virtue of the Jeffrey> presence of the lineterminator ';' and then
>     continues to scan Jeffrey> what remains.
> 
> I haven't the time to think deep thoughts about this problem at the
> moment. You might want to post to the csv mailing list
> (csv at mail.mojam.com) and see if one of the other csv folks can provide
> a more coherent/accurate answer.
> 
> Skip
> 
For the record, the answer that I got back from one of the developers is
that lineterminator is used only for output.
-- 
Jeffrey Barish





More information about the Python-list mailing list