kynikos / lib.py.configfile

Python library to dynamically parse and edit configuration files with support for subsections.
https://kynikos.github.io/lib.py.configfile/
MIT License
2 stars 1 forks source link

Support lists of values #18

Open kynikos opened 9 years ago

kynikos commented 9 years ago

By default, if a key is duplicated in a section, its value is assigned with the cascading rule. Optionally, instead, interpret this as the definition of a list, with each duplicated key hosting an item:

option = aaa
option = bbb
option = ccc

Alternatively, support interpreting numbered suffixes as list items, for example:

option[1] = aaa
option[2] = bbb
option[3] = ccc

Or distinguish lists from normal keys with a special prefix:

*option = aaa
*option = bbb
*option = ccc