[Spambayes] db query
Moore, Paul
Paul.Moore at atosorigin.com
Tue Apr 1 16:32:17 EST 2003
From: Skip Montanaro [mailto:skip at pobox.com]
> I doubt there's anything in the faq about it. Here's how to go about
> printing the raw spam/ham counts for a given token:
This only works for shelve-based databases. For bsddb3-based ones (eg,
the Outlook client) you can do
>>> import bsddb3
# Done on a copy - is it safe on the live db?
>>> db = bsddb3.hashopen("a.db")
>>> import cPickle
>>> print cPickle.loads(db["proto:http"])
(5576, 4205)
It would be nice if there were a generic wrapper which worked for any
database.
Paul.
More information about the Spambayes
mailing list