On 9 Jan 2007 01:43:41 -0800, Nuke <[EMAIL PROTECTED]> wrote:
> I need to visualize a number (or a string of that number) using the
> decimal separator.
> i have this number visualized: 50320,12 and i need that the
> visualization of this number is: 50.320,13.
> There is a function that directly convert the number (or the string) ?

I'm not very familiar with locale-aware programming in Python, but
this may get you started:

>>> import locale

>>> locale.setlocale(locale.LC_ALL, 'it')
'Italian_Italy.1252'

>>> locale.format("%0.2f", 50320.12, grouping=True)
'50.320,12'

See http://docs.python.org/lib/module-locale.html for documentation on
the locale module.

-- 
Jerry
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to