[Zope] Comma delimited file and the re python object
Stephan Richter
srichter@cbu.edu
Thu, 4 Nov 1999 07:19:01 -0600
On Thu, 04 Nov 1999, Max M wrote:
> I am trying to import a comma delimited ascii file via Python.
>
> naturally the pattern: , will not work as there might be a comma inside the
> text.
>
> the pattern "," wont work either as there as the numbers are not enclosed in
> quotes.
>
> There must be a simple pattern doing it right but I cannot seem to figure it
> out myself.
>
>
Look, then your datafile is corrupt. If you have commas in the text fields then
commas as seperator does not work. Period. Choose another delimitor such as
TAB. I wrote a long while back a parser for these things. It is trivial. Just a
few lines of code.
regards,
stephan
--
Stephan Richter
iXL - Software Designer and Engineer
CBU - Physics, Computer Science and Chemistry Student