[Zope] Comma delimited file and the re python object

Ty Sarna tsarna@endicor.com
4 Nov 1999 16:22:43 GMT


In article <Pine.LNX.4.04.9911041004230.2280-100000@gaaros.msrc.sunysb.edu>,
Pavlos Christoforou  <pavlos@gaaros.msrc.sunysb.edu> wrote:
> How about you first split the text by comma (string.split(line,',')). Then
> you iterate over the elements and whenever an element has an odd number of
> " (string.count(element,'"')%2) you join it with the following element.
> Repeat the procedure until there are no more changes.

Or you could steal the parsing code from TinyTables, which handles all this
pretty nicely, by using the python tokenizer :-)