Python 3 utility for converting plasma glucose ("blood sugar") units using argument parsing.
Convert:
- milligram per decileter to millimole per liter (mg/dl to mmol/l), or
- millimole per liter to milligram per decileter (mmol/l to mg/dl),
and receive a table of the conversion, e.g:
| mg/dl | mmol/l |
|---|---|
| 70.0000 | 3.8850 |
| 71.0000 | 3.9405 |
| 72.0000 | 3.9960 |
| 73.0000 | 4.0515 |
| 74.0000 | 4.1070 |
None.
Synopsis:
[-h] [--mg-to-mmol MG_TO_MMOL [MG_TO_MMOL ...] | --mmol-to-mg MMOL_TO_MG [MMOL_TO_MG ...]]Single conversion:
python3 gluctool.py --mmol-to-mg 4.0515Multiple conversions:
python3 gluctool.py --mg-to-mmol 7{0..9}
- Offer argument that integrates csv module to allow input of export of values.