James Mills wrote:
There is a much easier more consistent way:
import locale
locale.setlocale(locale.LC_ALL, "en_AU.UTF-8")
'en_AU.UTF-8'
doesn't work on all Python platforms, though:
>>> locale.setlocale(locale.LC_ALL, "en_AU.UTF-8")
Traceback (most recent call last):
File "", line 1, i
Hi,
There is a much easier more consistent way:
>>> import locale
>>> locale.setlocale(locale.LC_ALL, "en_AU.UTF-8")
'en_AU.UTF-8'
>>> locale.format("%0.2f", 500, True)
'5,000,000.00'
>>>
cheers
James
On Mon, Sep 8, 2008 at 5:24 AM, Alan G Isaac <[EMAIL PROTECTED]> wrote:
> On 9/7/2008 12:2
On 9/7/2008 12:22 PM SimonPalmer apparently wrote:
anyone recommend a way of formatting floats with comma separators?
http://code.activestate.com/recipes/498181/
Alan Isaac
--
http://mail.python.org/mailman/listinfo/python-list
anyone recommend a way of formatting floats with comma separators?
e.g. 50.00 -> 500,000.00
--
http://mail.python.org/mailman/listinfo/python-list