What INI config file module allows lists of duplicate same-named options?

Ben Finney ben+python at benfinney.id.au
Mon Jan 10 18:05:16 EST 2011


"Thomas L. Shinnick" <tshinnic at io.com> writes:

> Here, I need to list multiple file/dir path pairs.  A list of multiple
> items to be acted upon in a common way.  It is a list.  Simple.
> Except I can't find a library/pypi module with the obvious extension.

What you want is incompatible with calling the result “an INI file”,
because that entails the restrictions you described.

You would be better advised to use a configuration format that can do
what you want, such as YAML or JSON. Both of those have good Python
support; JSON in particular has support in the standard library.

-- 
 \      “Saying that Java is nice because it works on all OSes is like |
  `\     saying that anal sex is nice because it works on all genders” |
_o__)                                                —http://bash.org/ |
Ben Finney



More information about the Python-list mailing list