wiki:BluePrint/UpgradeConfig

Upgrading the Configuration

Currently merging new config options to existing deployments must be done by hand. This should be possible automatically.

Requirements

  • Merge current settings with new default config into new config
  • Preserve comments

ConfigParser

Python's built-in ConfigParser does not support preserving comments.

ConfigObj

ConfigObj documentation ConfigObj on PyPI

  • INI style config files, example
  • Used by bazaar, chandler, matplotlib, ipython, elisa

Config

Config documentation

  • Not sure if merge function supports preserving comments

JSON or XML

  • Advantage is that these are well-known formats, and both are readable from Python.
  • For comments, allow a "comment" field.

Further alternatives

Further alternatives are covered by the ConfigParser Shootout (circa 2004-2006)

Last modified 9 years ago Last modified on 02/14/16 19:39:40
Note: See TracWiki for help on using the wiki.