Is anyone happy with csv module?

John Machin sjmachin at lexicon.net
Tue Dec 11 21:22:45 EST 2007


massimo s. wrote:
> If your line of reasoning is "well, but you can write a function here
> and there", well, why bothering writing a csv parser at all? You can
> parse it yourself with a couple of Python lines! :)
>
>   
I would be *very* interested to see those couple of lines.
Here is some test data for you:
file_contents = '"Tom, Dick, and Harry","He said: ""Hello!"""\r\n"'
expected output: 1 row, with two fields:
(1) 'Tom, Dick, and Harry'
(2) 'He said: "Hello"'




More information about the Python-list mailing list