I figured out what was going wrong. Maybe. ZODB generates multiple files,
the database itself, an index file, a tmp file and a lock file. The shell
script I use to drive tte.py creates the database in a temp directory then
moves the file(s) into their rightful place. I did this to avoid problems
with the anydbm-style database. I tried modifying my driver script to mv
the various files into their correct location, but that didn't work. I
finally gave up and update the file in place. SpamBayes now tells me I have
an existing database with nonzero ham and spam when I open it:
>>> from spambayes import storage
>>> dbname, usedb = storage.database_type([])
>>> store = storage.open_storage(dbname, usedb, mode='r')
Loading state from /Users/skip/hammie.db (hammie.db) database
hammie.db is an existing ZODB, with 92 ham and 272 spam
>>> store.close()
Closed hammie.db database
If I open the file with mode='c' (the default) in tte.py, will the old ham
and spam be seen by other processes until I commit/close the database?
Skip
_______________________________________________
spambayes-dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/spambayes-dev