In <[EMAIL PROTECTED]>, Timothy Smith
wrote:
> hi there i need to set my locale so that when i output a number it's
> formatted with thousands grouped. the problem i've found is there
> doesn't seem to be very good cross platform support for locales, even
> between unix's it's horrid.
Have you tried this::
import locale
locale
locale.setlocale(LC_ALL, '')
locale.format('%.2f', 1000000, True)
The `True` turns on grouping. Should work cross platform.
Ciao,
Marc 'BlackJack' Rintsch
--
http://mail.python.org/mailman/listinfo/python-list