[CSV] Re: First Cut at CSV PEP
Skip Montanaro
skip at pobox.com
Wed Jan 29 03:36:04 CET 2003
Cliff> Frankly, I think I lean towards an exception on this one. There
Cliff> are enough text-processing tools available (dos2unix and kin)
Cliff> that someone should be able to pre-process a CSV file that is
Cliff> raising exceptions and get it into a form acceptable to the
Cliff> parser. A little work up front is far more acceptable than
Cliff> putting out a fire on someone's database.
How would you handle this example? You saved a file in Excel which
contained "hard returns". Line termination is thus CRLF and hard returns
are LF. Bring it over to your Unix system, run dos2unix on it, read it into
Python, fiddle with it and write it out. Now run unix2dos and push it back
to the Windows machine for viewing with Excel. Gues what just happened to
those "hard returns"?
:-(
Like you said, this may indeed be a very hard, or intractable problem.
I propose we not spend any more time on it now, but add it as an issue and
get some feedback from the broader community when an initial version of the
PEP is released (which I'd like to do in the next couple of days).
Skip
More information about the Csv
mailing list