The locale.setlocale(category=locale.LC_NUMERIC, locale="Slovenian") works like a charm in my application. Now the 'n format specifier works as I want. But tell me whether the 'n' forma specifier can be forced to round the float to just one decimal place. I know that the 'f' format specifier does that by specifying ".1f", but 'f' is not locale-aware. I have set the 'n' format specifier in my application like ".3n", which is okay if the returned number is two integers and one decimal, but is not okay if the returned number is one integer and two decimals, because I want just one decimal, always. How can I make that by using the 'n' format specifier?
-- http://mail.python.org/mailman/listinfo/python-list