>> I want to format values to the german form eg. 1.034,56 but
>> locale.format() doesn't work for me.
>
> seems to work here
In 2.6 this is good too:
>>> import decimal, locale
>>> locale.setlocale(locale.LC_ALL, 'mk_MK.UTF-8')
>>> '{0:n}'.format(1234.56)
'1 234,56'
--
дамјан ( http://soft
> I want to format values to the german form eg. 1.034,56 but
> locale.format() doesn't work for me.
seems to work here
>>> import decimal, locale
>>> locale.setlocale(locale.LC_ALL, 'mk_MK.UTF-8')
'mk_MK.UTF-8'
>>> locale.localeconv()['grouping']
[3, 3, 0]
>>> locale.localeconv()['thousands_sep
On Mon, Jul 20, 2009 at 5:07 PM, Egon Frerich wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> I want to format values to the german form eg. 1.034,56 but
> locale.format() doesn't work for me.
>
> Here is a little test program:
...
> k1 = locale.format_string('%12s',k,True)
I don't th
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I want to format values to the german form eg. 1.034,56 but
locale.format() doesn't work for me.
Here is a little test program:
import decimal, locale
print locale.getdefaultlocale()
print locale.localeconv()
locale.setlocale(locale.LC_ALL, ('de_DE