Request for a change in the csv module.

Paulo da Silva psdasilvaX at esotericaX.ptX
Tue Mar 13 17:42:50 CET 2007


skip at pobox.com escreveu:
>     Paulo> That is not the point. The problem is to have things generalized.
> 
> Well, perhaps.  One of the goals of the csv module was to do things the way
> Excel does things.

It would be nice because many csv users use it to export files to
spreadsheets and Excel is certainly a reference. But there may be a
difference! One thing is to do things as Excel does and another is
to write data in a way Excel understands. The later, IMO, is not so
complicated.

  Ideally, that would include formatting elements with
> locale sensitivity.  I've been working on a csv module in Python, so I
> decided to try the locale.format() calls in its writerow implementation.  A
> number of test cases broke as a result because apparently locale.format
> doesn't do its job quite the same way Excel does.
locale.format does not need to write the same way Excel does. It just
should convert in a way Excel understands.
Anyway, a csv user needs to do that if it is not provided by csv.




More information about the Python-list mailing list