pythonpropertiesconfigparser

Properties file in python (similar to Java Properties)


Given the following format (.properties or .ini):

propertyName1=propertyValue1
propertyName2=propertyValue2
...
propertyNameN=propertyValueN

For Java there is the Properties class that offers functionality to parse / interact with the above format.

Is there something similar in python's standard library (2.x) ?

If not, what other alternatives do I have ?


Solution

  • For .ini files there is the configparser module that provides a format compatible with .ini files.

    Anyway there's nothing available for parsing complete .properties files, when I have to do that I simply use jython (I'm talking about scripting).