[Mailman-Users] Feature request: editable welcome message

Barry A. Warsaw bwarsaw at cnri.reston.va.us
Mon Dec 20 19:35:09 CET 1999


>>>>> "DM" == Dan Mick <dan.mick at West.Sun.COM> writes:

    DM> I know I can write interactive Python code to extract the
    DM> welcome message, write it to a file so I can edit it, and suck
    DM> it back in

You'll want to look at bin/withlist, and if you've got the CVS
snapshot, bin/config_list.  Either can be used to make this easier.
    
    DM> if it needs to stay in config.db for reasons I don't
    DM> understand, perhaps config.db could look in a configurable
    DM> path for a file with a timestamp and decide "oh, it's changed,
    DM> I should snarf in a new one".  (Customizable welcome messages
    DM> are almost always used, IMO.)

Understand what config.db is: it's a marshaled Python dictionary.  The
keys of the dictionary correspond to attributes on the MailList
object.  What happens is that when a MailList object is saved, all of
it's attributes (except those that start with an underscore) are
examined and their values are placed into a dictionary.  That
dictionary is then marshaled into config.db for the list.

When the list is loaded, the config.db is unmarshaled and the MailList
object's attributes are set from the dictionary's key/value pairs.
It's a fairly simple, common, and portable (if not all that fast) way
to do "a database" in Python.

-Barry




More information about the Mailman-Users mailing list