[EMAIL PROTECTED] escreveu:
> On Mar 12, 4:26 pm, Paulo da Silva <[EMAIL PROTECTED]> wrote:
...

> 
> locale.setlocale(locale.LC_NUMERIC, 'pt_BR.ISO8859-1')
> csv_writer = csv.writer(open("foo.csv","w"), dialect='excel')
> rows = (('testing', 1.23), ('testing', 2.34))
> formatted_rows = ((string, locale.format('%g', number)) for
> (string,number) in rows)
> csv_writer.writerows(formatted_rows)


That works but it is a pain to use.
May be I'll sublass csv or even I'll write one myself.
It would be much better to be able to specify an additional
variabel to the Dialect class and change csv.

Thanks
Paulo
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to