[Spambayes-checkins] spambayes/scripts sb_mboxtrain.py,1.7,1.8

Skip Montanaro montanaro at users.sourceforge.net
Wed Jan 14 22:27:42 EST 2004


Update of /cvsroot/spambayes/spambayes/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv14475a

Modified Files:
	sb_mboxtrain.py 
Log Message:
add -o option to allow users to set arbitrary global options from the
command line


Index: sb_mboxtrain.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/scripts/sb_mboxtrain.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** sb_mboxtrain.py	17 Nov 2003 21:47:47 -0000	1.7
--- sb_mboxtrain.py	15 Jan 2004 03:27:40 -0000	1.8
***************
*** 38,41 ****
--- 38,44 ----
  
      -r  remove mail which was trained on (Maildir only)
+ 
+     -o section:option:value
+         set [section, option] in the options database to value
  """
  
***************
*** 283,287 ****
  
      try:
!         opts, args = getopt.getopt(sys.argv[1:], 'hfqnrd:D:g:s:')
      except getopt.error, msg:
          usage(2, msg)
--- 286,290 ----
  
      try:
!         opts, args = getopt.getopt(sys.argv[1:], 'hfqnrd:D:g:s:o:')
      except getopt.error, msg:
          usage(2, msg)
***************
*** 318,321 ****
--- 321,326 ----
              usedb = False
              pck = arg
+         elif opt == '-o':
+             options.set_from_cmdline(arg, sys.stderr)
      if args:
          usage(2, "Positional arguments not allowed")





More information about the Spambayes-checkins mailing list