Kevin> Now when I launch SpamBayes, I get this:

    Kevin> Starting SpamBayes Server
    Kevin> Traceback (most recent call last):
    Kevin>   File "/Library/SpamBayes/sb_server.py", line 104, in <module>
    Kevin>     import spambayes.message
    Kevin>   File "/Library/SpamBayes/spambayes/message.py", line 78
    Kevin>     from __future__ import generators
    Kevin> SyntaxError: from __future__ imports must occur at the beginning of 
the file

    Kevin> Is SpamBayes not compatible with recent versions of Python?

You're probably using 1.0.4.  I don't think the Mac installer has been
updated quite awhile.  Just edit /Library/SpamBayes/spambayes/message.py and
move the from __future__ statement up above the __author__ = statement.
As I recall there are a couple other places where the from __future__
statement doesn't occur as the first statement of the file.

You might also try downloading 1.1a4 from www.spambayes.org.  Installing it
is a simple

    python setup.py install --prefix=$HOME/local

after which sb_server.py will be installed in ~/local/bin.

Skip
_______________________________________________
SpamBayes@python.org
http://mail.python.org/mailman/listinfo/spambayes
Check the FAQ before asking: http://spambayes.sf.net/faq.html

Reply via email to