locale support and 4.10

"Martin v. Löwis" martin at v.loewis.de
Sat Mar 5 03:11:40 EST 2005


Timothy Smith wrote:
>  >>> locale.setlocale(locale.LC_NUMERIC, 'us')
> the exact same thing works under windows xp.
> do i have to compile it with locale support?

No. You have to choose a locale name that is supported by your
operating system (which appears to be FreeBSD). Read your OS
documentation for what valid locale names are; most likely,
"en_US" or "en_US.ISO-8859-1" are supported.

> also my second question. once i have this working how do i set the 
> thousands_sep character to be a "," ?

You don't directly set it. It is a property of the locale.

Regards,
Martin



More information about the Python-list mailing list