A
andyj
I've tried using the locale module to set the locale correctly, but
all I get is "Error: unsupported locale setting".
I'm not actually sure what the proper setting should be; I think it's
"fi" for Finland, but this is what I get when I try (under py 2.2):
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/python2.2.2/lib/locale.py", line 372, in setlocale
return _setlocale(category, locale)
locale.Error: locale setting not supported
Under 2.3 the call succeeds but makes no difference to the decimal
point (which should be a comma for Finland):
' 0.12'
The program I'm working on produces database records using a format
string, and I'm currently manually tracking all the dp's and replacing
them in a loop, just before writing the record to disk, but this is
inefficient and inelegant.
What I'd *like* to be able to do is specify that we want to use commas
for dp's or adjust the locale settings accordingly, then just write
the records directly from the format string...
regards,
-andyj
all I get is "Error: unsupported locale setting".
I'm not actually sure what the proper setting should be; I think it's
"fi" for Finland, but this is what I get when I try (under py 2.2):
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/python2.2.2/lib/locale.py", line 372, in setlocale
return _setlocale(category, locale)
locale.Error: locale setting not supported
Under 2.3 the call succeeds but makes no difference to the decimal
point (which should be a comma for Finland):
' 0.12'
The program I'm working on produces database records using a format
string, and I'm currently manually tracking all the dp's and replacing
them in a loop, just before writing the record to disk, but this is
inefficient and inelegant.
What I'd *like* to be able to do is specify that we want to use commas
for dp's or adjust the locale settings accordingly, then just write
the records directly from the format string...
regards,
-andyj