[Spambayes-checkins] spambayes/spambayes CoreUI.py, NONE, 1.1.2.1 Options.py, 1.141, 1.141.2.1

Skip Montanaro montanaro at users.sourceforge.net
Fri May 18 05:54:41 CEST 2007


Update of /cvsroot/spambayes/spambayes/spambayes
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv26612/spambayes

Modified Files:
      Tag: CORESVR
	Options.py 
Added Files:
      Tag: CORESVR
	CoreUI.py 
Log Message:
Definitely not yet ready for prime time, but need to check this in so I have
something to fall back on.


--- NEW FILE: CoreUI.py ---
"""Core Web Interface

Classes:
    CoreUserInterface - Interface class for basic (non-plugin) display

Abstract:

This module implements a browser based Spambayes user interface for the
the core server.  Users may use it to interface with various plugins.

The following functions are currently included:
[From the base class UserInterface]
  onClassify - classify a given message
  onWordquery - query a word from the database
  onTrain - train a message or mbox
  onSave - save the database and possibly shutdown
[Here]
  onHome - a home page with various options
  onUpload - upload a message for later training (used by proxytee.py)
[...1030 lines suppressed...]
                    if details[0] != winerror.ERROR_ACCESS_DENIED:
                        raise
                    raise AlreadyRunningException
                # mutex opened - now check if we actually created it.
                if win32api.GetLastError()==winerror.ERROR_ALREADY_EXISTS:
                    win32api.CloseHandle(hmutex)
                    raise AlreadyRunningException
                self.mutex = hmutex
                return
            except ImportError:
                # no win32all - no worries, just start
                pass
        self.mutex = None

    def close_platform_mutex(self):
        """Toss out the current mutex."""
        if sys.platform.startswith("win"):
            if self.mutex is not None:
                self.mutex.Close()
        self.mutex = None

Index: Options.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/spambayes/Options.py,v
retrieving revision 1.141
retrieving revision 1.141.2.1
diff -C2 -d -r1.141 -r1.141.2.1
*** Options.py	26 Mar 2007 07:57:13 -0000	1.141
--- Options.py	18 May 2007 03:54:39 -0000	1.141.2.1
***************
*** 653,656 ****
--- 653,671 ----
       PATH, DO_NOT_RESTORE),
  
+     ("core_spam_cache", _("Spam cache directory"), "core-spam-cache",
+      _("""Directory that SpamBayes should cache spam in.  If this does
+      not exist, it will be created."""),
+      PATH, DO_NOT_RESTORE),
+ 
+     ("core_ham_cache", _("Ham cache directory"), "core-ham-cache",
+      _("""Directory that SpamBayes should cache ham in.  If this does
+      not exist, it will be created."""),
+      PATH, DO_NOT_RESTORE),
+ 
+     ("core_unknown_cache", _("Unknown cache directory"), "core-unknown-cache",
+      _("""Directory that SpamBayes should cache unclassified messages in.
+      If this does not exist, it will be created."""),
+      PATH, DO_NOT_RESTORE),
+ 
      ("cache_messages", _("Cache messages"), True,
       _("""You can disable the pop3proxy caching of messages.  This



More information about the Spambayes-checkins mailing list