> -----Original Message----- > Date: Fri, 26 Jan 2007 22:40:24 -0500 > From: Kent Johnson <[EMAIL PROTECTED]> > Subject: Re: [Tutor] converting tab-delimited text files to csv > To: Luke Paireepinart <[EMAIL PROTECTED]> > Cc: tutor@python.org > Message-ID: <[EMAIL PROTECTED]> > 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 [EMAIL PROTECTED] 541-302-1107 ________________________ We who cut mere stones must always be envisioning cathedrals. -Quarry worker's creed _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor