Re: Request for a change in the csv module.

2007-03-13 Thread Diez B. Roggisch
Paulo da Silva schrieb: [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

Re: Request for a change in the csv module.

2007-03-13 Thread Szabolcs Nagy
It would be much better to be able to specify an additional variabel to the Dialect class and change csv. no it wouldn't this is a locale specific problem so it should be handled there -- http://mail.python.org/mailman/listinfo/python-list

Re: Request for a change in the csv module.

2007-03-13 Thread Paulo da Silva
Diez B. Roggisch escreveu: Paulo da Silva schrieb: ... That works but it is a pain to use. Why? I think it's straightforward. That is not the point. The problem is to have things generalized. I have some general purpose tables whose fields format I don't know in advance. Internally the

Re: Request for a change in the csv module.

2007-03-13 Thread Diez B. Roggisch
Paulo da Silva wrote: Diez B. Roggisch escreveu: Paulo da Silva schrieb: ... That works but it is a pain to use. Why? I think it's straightforward. That is not the point. The problem is to have things generalized. I have some general purpose tables whose fields format I don't know

Re: Request for a change in the csv module.

2007-03-13 Thread skip
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. Ideally, that would include formatting elements with locale sensitivity. I've been working on a csv module in Python, so I

Re: Request for a change in the csv module.

2007-03-13 Thread Paulo da Silva
Diez B. Roggisch escreveu: Paulo da Silva wrote: ... That it does convert non-string-values to strings when writing could be seen as convenience, or actual bug as it might cause troubles as you perceived them - but the solution would clearly be to get rid of this functionality, not enhance

Re: Request for a change in the csv module.

2007-03-13 Thread Paulo da Silva
[EMAIL PROTECTED] 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

Re: Request for a change in the csv module.

2007-03-12 Thread attn . steven . kuo
On Mar 12, 4:26 pm, Paulo da Silva [EMAIL PROTECTED] wrote: Hi. I have just seen that csv module, more exactly the Dialect class, does not have any variable to specify the floating point character! In portuguese this is ','. Not '.'. 3.1415 - 3,1415. I think this is also the case of other

Re: Request for a change in the csv module.

2007-03-12 Thread Paulo da Silva
[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,