No hay una solución bendecida hasta donde yo sé. No existe una forma correcta o incorrecta de almacenar la configuración de la aplicación, ni xml, json ni todos los tipos de archivos están bien, siempre y cuando te sientas cómodo. Para Python personalmente uso pypref es muy fácil, multiplataforma y directo.
pypref es muy útil, ya que uno puede almacenar configuraciones y preferencias estáticas y dinámicas ...
from pypref import Preferences
# create singleton preferences instance
pref = Preferences(filename="preferences_test.py")
# create preferences dict
pdict = {'preference 1': 1, 12345: 'I am a number'}
# set preferences. This would automatically create preferences_test.py
# in your home directory. Go and check it.
pref.set_preferences(pdict)
# lets update the preferences. This would automatically update
# preferences_test.py file, you can verify that.
pref.update_preferences({'preference 1': 2})
# lets get some preferences. This would return the value of the preference if
# it is defined or default value if it is not.
print pref.get('preference 1')
# In some cases we must use raw strings. This is most likely needed when
# working with paths in a windows systems or when a preference includes
# especial characters. That's how to do it ...
pref.update_preferences({'my path': " r'C:\Users\Me\Desktop' "})
# Sometimes preferences to change dynamically or to be evaluated real time.
# This also can be done by using dynamic property. In this example password
# generator preference is set using uuid module. dynamic dictionary
# must include all modules name that must be imported upon evaluating
# a dynamic preference
pre = {'password generator': "str(uuid.uuid1())"}
dyn = {'password generator': ['uuid',]}
pref.update_preferences(preferences=pre, dynamic=dyn)
# lets pull 'password generator' preferences twice and notice how
# passwords are different at every pull
print pref.get('password generator')
print pref.get('password generator')
# those preferences can be accessed later. Let's simulate that by creating
# another preferences instances which will automatically detect the
# existance of a preferences file and connect to it
newPref = Preferences(filename="preferences_test.py")
# let's print 'my path' preference
print newPref.get('my path')
Según Wikipedia, los archivos "ini" fueron predominantes en las ventanas donde se ha dejado de utilizar. Entonces IMO, deberías saltarte esa opción. – WhyNotHugo
De Microsoft: [¿Por qué los archivos INI están en desuso en favor del registro?] (Https://blogs.msdn.microsoft.com/oldnewthing/20071126-00/?p=24383) – jkdev