I really like Python's
ConfigParser API. I find using an INI style config file to be very readable and nice to work with as opposed to using XML or JSON. There are very few cross-platform libraries available to do this. However, when you have Cython, all you need is Python.
For this example, we will create a sample
INI configuration file and write a simple API to access a list of sections, list of keys available in a section, and a way to get the value from a specified key within a section. These three functions will allow a programmer to access any
A sample INI file could be:
[example] number = 15 path = some/path/to/something [another_section] test = something
An INI file is comprised of sections within ...