Hi All, When i try to set a locale manually, i get this error.
>>> import locale >>> locale.setlocale(locale.LC_ALL, 'es_cl.iso88591') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/locale.py", line 531, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting On my OS, when i run the locale -a command, i get this output ------------------------- *locale -a* C POSIX en_US en_US.8859-15 en_US.ISO8859-1 ------------------------- Does this means that on my machine, Python will be able to make use of above listed locales? *If yes then how can i possibly use the locale.setformat (or anything else for that matter) to group numbers using '.' as the thousands separator?* If i use the locale en_US then ',' is the thousands separator. >>> import locale >>> locale.setlocale(locale.LC_ALL, 'en_US') 'en_US' >>> locale.format("%d", 1255000, grouping=True) '1,255,000' Regards, Anurag
-- http://mail.python.org/mailman/listinfo/python-list