Re: csv module and None values

2009-08-29 Thread JKPeck
On Aug 25, 8:49 am, Peter Otten __pete...@web.de wrote: JKPeck wrote: On Aug 24, 10:43 pm, John Yeung gallium.arsen...@gmail.com wrote: On Aug 24, 5:00 pm, Peter Otten __pete...@web.de wrote: If I understand you correctly the csv.writer already does what you want:

Re: csv module and None values

2009-08-25 Thread JKPeck
On Aug 24, 10:43 pm, John Yeung gallium.arsen...@gmail.com wrote: On Aug 24, 5:00 pm, Peter Otten __pete...@web.de wrote: If I understand you correctly the csv.writer already does what you want: w.writerow([1,None,2]) 1,,2 just sequential commas, but that is the special treatment.

Re: csv module and None values

2009-08-25 Thread Peter Otten
JKPeck wrote: On Aug 24, 10:43 pm, John Yeung gallium.arsen...@gmail.com wrote: On Aug 24, 5:00 pm, Peter Otten __pete...@web.de wrote: If I understand you correctly the csv.writer already does what you want: w.writerow([1,None,2]) 1,,2 just sequential commas, but that is the

Re: csv module and None values

2009-08-24 Thread JKPeck
On Aug 24, 11:30 am, JKPeck jkp...@gmail.com wrote: I'm trying to get the csv module (Python 2.6) to write data records like Excel.  The excel dialect isn't doing it.  The problem is in writing None values.  I want them to result in just sequential commas - ,, but csv treats None specially, as

Re: csv module and None values

2009-08-24 Thread Peter Otten
JKPeck wrote: I'm trying to get the csv module (Python 2.6) to write data records like Excel. The excel dialect isn't doing it. The problem is in writing None values. I want them to result in just sequential commas - ,, but csv treats None specially, as the doc says, To make it as easy

Re: csv module and None values

2009-08-24 Thread John Yeung
On Aug 24, 1:30 pm, JKPeck jkp...@gmail.com wrote: I'm trying to get the csv module (Python 2.6) to write data records like Excel.  The excel dialect isn't doing it.  The problem is in writing None values.  I want them to result in just sequential commas - ,, but csv treats None specially, as

Re: csv module and None values

2009-08-24 Thread John Yeung
On Aug 24, 5:00 pm, Peter Otten __pete...@web.de wrote: If I understand you correctly the csv.writer already does what you want: w.writerow([1,None,2]) 1,,2 just sequential commas, but that is the special treatment. Without it the None value would be converted to a string and the line