[Spambayes] Storing Options [was Outlook feature request]
Tim Stone - Four Stones Expressions
tim at fourstonesExpressions.com
Wed Feb 26 16:29:16 EST 2003
2/26/2003 4:21:37 PM, "Meyer, Tony" <T.A.Meyer at massey.ac.nz> wrote:
>> Breaking existing systems isn't bad if we fix them... <wink>
>:) If it comes to it, I must remember you are the one to commit the changes
so that people scream at you when the bit we missed breaks ;)
And they'll scream...
>[New update ini function]
>> This sounds good to me. I wonder if the Options file is
>> really what we need to carry forward, though.
>> A simple ini file is really more useful and
>> maintainable (imo), and the options module could easily be
>> modified to support the same syntax that it supports now,
>> but read from an ini file. The syntax
>> is the only value that it adds now anyway, and that's what should be
>Well, the options module is pretty much a module with an embedded ini file,
isn't it? I presume that back when things started there was a reason to have
all the defaults in a module rather than provide a default ini (but I can't be
bothered looking through the list history). Why do you think that an ini
would be more maintainable?
The ini file is a standard format, and we can probably even find a client that
maintains the file for us. It's recognizable to most everyone, and doesn't
require that a particular parameter be specified, then 'cracked' in a separate
place. The downside is that the ConfigParser doesn't recognize anything but
string values. But the options file is not as easily maintainable using a GUI
client, because it's parsed at import time. So you gotta go through some
gyrations make the GUI show the proper values, and write the options file (the
option module won't write itself, and probably can't). Then if you manage to
make a mistake in the options file, stuff doesn't run anymore, cause the
import will raise an exception. So... the option file is broken, but you have
to use the import file to bring up the GUI to fix the problem, etc. etc....
These are the problems I encountered when I wrote the option configurator for
pop3proxy. It was ugly.
c'est moi - TimS
More information about the Spambayes