in reply to Re^3: Textfile to csv with a small twist
in thread Textfile to csv with a small twist

I'm with you.

The data is a simple sample. The code provided is also a simple sample. The OP did not ask for a production quality solution nor was one given.

On the other hand, jZed provided no solution to the task at hand. I haven't yet needed to use a CSV parsing module but would love to see a good example provided here.

  • Comment on Re^4: Textfile to csv with a small twist

Replies are listed 'Best First'.
Re^5: Textfile to csv with a small twist
by jZed (Prior) on Aug 25, 2005 at 21:21 UTC
    The data is a simple sample.
    No it isn't, it has embedded newlines.
    jZed provided no solution to the task at hand
    That's because I was waiting for the OP to clarify what he/she really wanted. Now that the OP has done that, I've given the example, please see my code.
      ok. The fact that you were waiting for the clarification of the post which was quite vague makes sense. Perhaps I should have done that myself.

      I still see the sample data as "simple". Virtually every text file I parse has embedded new lines.

      I'll have to take a look at some of the text/csv parsing modules now. Your code made them look very useful and makes me think I have been working too hard at parsing in the past.