Publisher review:Format number function script introduces two functions useful to format numbers. For many languages it is possible to use the locale module to format numbers. But there are at least three languages for which the locale.localeconv()['thousands_sep'] is empty: brazilian portuguese - 'pt_br', portuguese - 'pt' and spanish - 'es'.
The first function, format_positive_integer() will return the passed integer number as a string with the thousands group separator added.
The second function, format_number() much more generic, will accept any number, integer or float, positive or negative, and return a string with the thousands group separator and the desired precision.
Format number function 1.1 is a Python script for Programming Methods and Algorithms scripts design by Clodoaldo Pinto Neto.
It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
Format number function script introduces two functions useful to format numbers.
Operating system:Windows / Linux / Mac OS / BSD / Solaris