[Spambayes-checkins] spambayes/scripts sb_notesfilter.py,1.5,1.6

Skip Montanaro montanaro at users.sourceforge.net
Wed Jan 14 22:29:18 EST 2004


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

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


Index: sb_notesfilter.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/scripts/sb_notesfilter.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** sb_notesfilter.py	16 Dec 2003 05:06:33 -0000	1.5
--- sb_notesfilter.py	15 Jan 2004 03:29:16 -0000	1.6
***************
*** 103,106 ****
--- 103,109 ----
                            statistics output would otherwise be lost when the
                            window closes.
+             -o section:option:value :
+                           set [section, option] in the options database
+                           to value
  
  Examples:
***************
*** 344,348 ****
  
      try:
!         opts, args = getopt.getopt(sys.argv[1:], 'htcpd:D:l:r:f:')
      except getopt.error, msg:
          print >>sys.stderr, str(msg) + '\n\n' + __doc__
--- 347,351 ----
  
      try:
!         opts, args = getopt.getopt(sys.argv[1:], 'htcpd:D:l:r:f:o:')
      except getopt.error, msg:
          print >>sys.stderr, str(msg) + '\n\n' + __doc__
***************
*** 379,382 ****
--- 382,387 ----
          elif opt == '-p':
              doPrompt = True
+         elif opt == '-o':
+             options.set_from_cmdline(arg, sys.stderr)
  
      if (bdbname and ldbname and sbfname and (doTrain or doClassify)):





More information about the Spambayes-checkins mailing list