CSV Parser and unusual (?) linesterminator - misunderstanding?

Tino Lange Tino.Lange at is-teledata.com
Fri Jan 20 05:37:17 EST 2006


Peter Otten wrote:

> Tino Lange wrote:
> 
>> I'm trying to use the csv Parser included with Python. Field Delimiter is
>> "|", Line Delimiter is "#". Unfortunately it doesn't work as expected.
>> The parser seems to just ignore the 'lineterminator'?
> 
> The csv reader accepts '\r' '\r\n' or '\n' as line endings, even mixed in
> the same file. This behaviour is hardcoded. Only the writer uses the
> lineterminator specified in the dialect.

Boah ... Really?
 
a) this is not in the documentation ... or did I oversee something?

b) this is really unacceptable, or? At least we here have many CSV's with
other lineterminators than '\n'.

Is this going to be changed? Is someone working on it? Or are patches for SF
wanted?

Cheers,

Tino




More information about the Python-list mailing list