I want to parse a config.ini file into a dictionary a la Automatically read configuration values in Python, but automatically identifying the data types - as much as possible - in some clever fashion. Is there a way to do this, or must it be coded by hand, and if so what is a good way to go? Thanks!
Here's an example:
[multinest]
n_live_points = 500 ; or 1000
multimodal = False ; Posterior unlikely to be multimodal
max_modes = 1
seed = 1234 ; [-1 for clock]
do_ins = False
max_iter = 0
evidence_tolerance = 0.5
mode_tolerance = -1e90
outstem = 1-
I would like a loader that can differentiate the main standard python types: strings, floats, integers, booleans, lists, dictionaries, plus numpy arrays.
These are also helpful (but old?):