Commit Graph

6 Commits

Author SHA1 Message Date
Sophist
b80091b56e Use Universal Newline Support instead. 2014-03-24 20:11:14 +00:00
Sophist
78d2ebf9a3 Strip CR as well as LF to avoid errors on Windows 2014-03-24 07:42:40 +00:00
Laurent Monin
7c6d3e9c3b decimal(): fix missing parameter prec and update tests 2013-12-28 00:17:42 +01:00
Laurent Monin
7dd311697f tests: PEP8 fixes 2013-07-03 03:37:24 +02:00
Laurent Monin
fdbed3f6c1 Remove fr_FR locale test, too much a requirement. 2013-06-18 12:24:09 +02:00
Laurent Monin
6de59d8ee9 Add functions to convert bytes to human readable form.
Binary and decimal modes are supported (MB and MiB ie.)
It supports i18n using gettext and locale.
Precision can be modified if needed, by default it is using 1 digit (if needed).

Extensive tests were written, the toughest was to make them work for
both default C locale and fr_FR.UTF-8 locale (ofc it is possible to test for more
locales...). If one locale isn't available on testing system, test is skipped.
fr locale was chosen because decimal point is replaced by a comma and byte units
becomes "octet" units (1.5 MB in english -> 1,5 Mo in french).
2013-06-09 14:23:23 +02:00