[Spambayes-checkins] spambayes/utilities pop3graph.py, 1.3, 1.4 which_database.py, 1.7, 1.8

Tony Meyer anadelonbrin at users.sourceforge.net
Mon Jan 12 03:36:18 EST 2004


Update of /cvsroot/spambayes/spambayes/utilities
In directory sc8-pr-cvs1:/tmp/cvs-serv21286/utilities

Modified Files:
	pop3graph.py which_database.py 
Log Message:
Well, it's been some time, and no-one disagreed, and three people liked the idea,
so here it is.

MAY BREAK THINGS!

>From now, path/file options are not relative to the current working directory,
they are relative to the last configuration file loaded.  This still defaults to the
current working directory (except on Windows with win32all, where it's still
the User Application Data directory).  So this should mean no noticeable change,
unless your last configuration file is not in the current working directory, and
your data is.

Index: pop3graph.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/utilities/pop3graph.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** pop3graph.py	4 May 2003 03:16:45 -0000	1.3
--- pop3graph.py	12 Jan 2004 08:36:16 -0000	1.4
***************
*** 29,36 ****
      else:
          messageFactory = FileMessageFactory()
!     spamCorpus = FileCorpus(messageFactory, options["pop3proxy",
!                                                     "spam_cache"])
!     hamCorpus = FileCorpus(messageFactory, options["pop3proxy",
!                                                    "ham_cache"])
  
      # Read in all the trained messages.
--- 29,36 ----
      else:
          messageFactory = FileMessageFactory()
!     sc = get_pathname_option("Storage", "spam_cache")
!     hc = get_pathname_option("Storage", "ham_cache")
!     spamCorpus = FileCorpus(messageFactory, sc)
!     hamCorpus = FileCorpus(messageFactory, hc)
  
      # Read in all the trained messages.

Index: which_database.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/utilities/which_database.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** which_database.py	16 Dec 2003 05:06:34 -0000	1.7
--- which_database.py	12 Jan 2004 08:36:16 -0000	1.8
***************
*** 27,31 ****
  sys.path.insert(-1, os.path.dirname(os.getcwd()))
  
! from spambayes.Options import options
  import dumbdbm
  import dbhash
--- 27,31 ----
  sys.path.insert(-1, os.path.dirname(os.getcwd()))
  
! from spambayes.Options import options, get_pathname_option
  import dumbdbm
  import dbhash
***************
*** 73,77 ****
      print
  
!     hammie = os.path.expanduser(options["Storage", "persistent_storage_file"])
      use_dbm = options["Storage", "persistent_use_database"]
      if not use_dbm:
--- 73,77 ----
      print
  
!     hammie = get_pathname_option("Storage", "persistent_storage_file")
      use_dbm = options["Storage", "persistent_use_database"]
      if not use_dbm:





More information about the Spambayes-checkins mailing list