[Tutor] Formatting Numbers as Strings 33000.50 -> 33,000.50 ?

Jethro Cramp jsc_lists@rock-tnsc.com
Thu, 29 Mar 2001 10:38:31 +0800


> -----Original Message-----
> From: tutor-admin@python.org [mailto:tutor-admin@python.org]On Behalf Of
> Rick Pasotto
> Sent: Thursday, March 29, 2001 1:21 AM
> To: tutor@python.org
> Subject: Re: [Tutor] Formatting Numbers as Strings 33000.50 -> 33,000.50
> When I do that [actually, locale.setlocale(locale.LC_ALL,"us")] I get
> 'locale setting not supported.' What do I need to do to get it
> supported? I'm running debian and the 'locales' package is installed.
>
It worked fine on my Windows box. Haven't had a chance to check on Linux
yet.

On my Windows box if I try and set the locale to "de" it gives me the same
error (locale setting not supported).
I guess we are both missing important information in our setups.

FYI if I set the locale to "us"  and then "uk" I get the reply:

>>> locale.setlocale(locale.LC_ALL, "us")
'English_United States.1252'
>>> locale.setlocale(locale.LC_ALL, "uk")
'English_United Kingdom.1252'

Regards,

Jethro