2013/3/7 Peter Otten <__pete...@web.de>: > Last not least there's the option to employ locale-aware formatting: > >>>> import locale >>>> locale.setlocale(locale.LC_ALL, "en_US.UTF-8") > 'en_US.UTF-8' >>>> locale.format("%d", 12345, grouping=True) > '12,345' > > In German usage of "." and "," is reversed, so: > >>>> locale.setlocale(locale.LC_ALL, "de_DE.UTF-8") > 'de_DE.UTF-8' >>>> locale.format("%d", 12345, grouping=True) > '12.345'
Does this locale-aware example only work on UNIX? -- http://mail.python.org/mailman/listinfo/python-list