[Spambayes] UpdatableConfigParser

Meyer, Tony T.A.Meyer at massey.ac.nz
Thu Mar 13 17:29:28 EST 2003


Those that were paying attention will recall a discussion a couple of weeks back about config files, paticularly updating them.

I've just committed a new module - UpdatableConfigParser.  This extends ConfigParser so that config files can be updated (retaining whitespace and comments), rather than simpyl rewritten.  It should work fine with multiple config files, like ConfigParser, although there are issues to consider when doing so.

Only those using OptionConfig to change their options should notice any difference at all.  For everyone else the functions are either almost identical to ConfigParser, or are the ConfigParser functions.

Those that do use OptionConfig will now be able to retain comments and whitespace in their ini files.  The Outlook plugin *might* also someday use this module.

I've tried to test this as thoroughly as possible, but no doubt as soon as I commit it, there will be an error.  I'll try to get this fixed ASAP.  Anyone wanting to do more testing with multiple files (there are so many possibilities!) is very welcome to do so (OptionConfig only works with one file, so this will not actually effect anyone currently using it).

The __doc__ has a lot more information.  I would hope this would be useful to any UI that allows modification of config files (are there any apart from OptionConfig at the moment?).

=Tony Meyer



More information about the Spambayes mailing list