+class EditConfig(object):
- """
- Edit values in a configuration file without changing comments.
- Supports KEY=VALUE lines and ignores everything else.
- Does not allow adding or deleting keys.
- Does not support duplicate key entries.
- ec = EditConfig("/path/to/file")
- ec.values is a dict of keys from the file, edit as needed then call:
- ec.write()
- """
Is python's ConfigParser insufficient for this purpose?
- Chris