[Tutor] converting tab-delimited text files to csv

Carroll, Barry 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
each
> > 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.
> 
> Kent


Greetings:

It's useful to recall that the Python CSV module was written to handle
Microsoft's implementation of the format.  According to Wikipedia

	(http://en.wikipedia.org/wiki/Comma-separated_values)

there is no formal specification. The article includes these two links:

	http://tools.ietf.org/html/rfc4180
	http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm

Here's another link that I've found useful:

	http://object-craft.com.au/projects/csv/

HTH.

Regards,
 
Barry
barry.carroll at psc.com
541-302-1107
________________________
We who cut mere stones must always be envisioning cathedrals.

-Quarry worker's creed





More information about the Tutor mailing list