[Tutor] converting tab-delimited text files to csv
Barry.Carroll at psc.com
Mon Jan 29 20:09:25 CET 2007
> -----Original Message-----
> Date: Fri, 26 Jan 2007 22:40:24 -0500
> From: Kent Johnson <kent37 at tds.net>
> Subject: Re: [Tutor] converting tab-delimited text files to csv
> To: Luke Paireepinart <rabidpoobear at gmail.com>
> Cc: tutor at python.org
> Message-ID: <45BAC9A8.4060204 at tds.net>
> Content-Type: text/plain; charset=windows-1252; format=flowed
> Luke Paireepinart wrote:
> > csv is comma-separated values, right?
> > you should be able to just do a string replace of tabs -> commas on
> > line in the new file...
> > or is the csv format more complicated than that?
> Yes, it is more complicated than that because the data itself may
> contain commas.
It's useful to recall that the Python CSV module was written to handle
Microsoft's implementation of the format. According to Wikipedia
there is no formal specification. The article includes these two links:
Here's another link that I've found useful:
barry.carroll at psc.com
We who cut mere stones must always be envisioning cathedrals.
-Quarry worker's creed
More information about the Tutor