Tony, Thanks for this info!
Erik Brown -----Original Message----- From: Tony Meyer [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 05, 2005 12:49 AM To: Erik Brown Cc: [email protected] Subject: Re: Using spamcounts.py > I ran across this message on the forums a few years back: > http://mail.python.org/pipermail/spambayes/2003-December/010005.html > and I want to try the same thing to analyze all of my tokens. > > For some reason, when I use spamcounts.py -r '.*' to export to CVS > I get an > error message below. (I'm running the outlook addin from source.) > How do I > specify a path? > > exec codeObject in __main__.__dict__ > File "F:\!Programs\SpamBayes From Source\spambayes\contrib > \spamcounts.py", > line 27, in ? > from spambayes.Options import options, get_pathname_option > ImportError: No module named spambayes.Options I know you're planning on using sb_dbexpimp.py instead, but in case you're still curious or someone looks through the archives for an answer to this: You need to tell Python where the SpamBayes package is. There are three ways to do this, any of which will work: 1. Run "python setup.py install" in the top-level spambayes directory. This will install the spambayes package in the Python Lib \site-packages directory. 2. Set the environment variable PYTHONPATH to include the path to the spambayes top-level directory. Something like 'set PYTHONPATH="F: \!Programs\SpamBayes From Source\spambayes"' (no single-quotes). 3. Run the script from the spambayes top-level directory (e.g. "python contrib\spamcounts.py"). Python will look in the current directory for the package. =Tony.Meyer -- Please always include the list (spambayes at python.org) in your replies (reply-all), and please don't send me personal mail about SpamBayes. http://www.massey.ac.nz/~tameyer/writing/reply_all.html explains this. _______________________________________________ [email protected] http://mail.python.org/mailman/listinfo/spambayes Check the FAQ before asking: http://spambayes.sf.net/faq.html
