[Spambayes] A few code questions (Outlook oriented)

David LeBlanc whisper at oz.net
Wed Feb 19 02:14:14 EST 2003


I would like to fix the read status change problem. I would like to know the
following:

1. Where in the code is the handler for the "delete as spam" button?

2. Where is the code for sending a spam to the spam folder (when it's
determined to be spam upon fetching from the mail server).

Now for the (probably) dumb question. I don't see how this works:

#manager.py, line 159
        # determine which db manager to use, and create it.
        ManagerClass = [PickleStorageManager, DBStorageManager][use_db]
        self.db_manager = ManagerClass(bayes_base, mdb_base)

ManagerClass is two lists, one has pointers to the two classes and the other
is the flag - and then it's called!?! eh? (I have no immediate plans to
change this (if I ever do), but I would like to understand what's going on.)

BTW, how does it get to reference a global (use_db) without a "global"
statement in the __init__ scope? I can't see where use_db gets used either?

Thanks to the kind soul(s) that help,

David LeBlanc
Seattle, WA USA




More information about the Spambayes mailing list