locale doesn' format

Дамјан Георгиевски gdamjan at gmail.com
Mon Jul 20 20:44:38 EDT 2009



>> 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://softver.org.mk/damjan/ )

A: Because it reverses the logical flow of conversation.
Q: Why is top posting frowned upon?




More information about the Python-list mailing list