[Spambayes-checkins] spambayes/testtools timcv.py,1.7,1.8
Tony Meyer
anadelonbrin at users.sourceforge.net
Mon Oct 18 07:30:50 CEST 2004
Update of /cvsroot/spambayes/spambayes/testtools
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3106/testtools
Modified Files:
timcv.py
Log Message:
It's handy when testing to be able to toggle an option without editing a configuration
script, so copy Skip's -o command line option (available in all the regular scripts)
to timcv.py.
Index: timcv.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/testtools/timcv.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** timcv.py 7 Apr 2004 06:49:04 -0000 1.7
--- timcv.py 18 Oct 2004 05:30:47 -0000 1.8
***************
*** 11,14 ****
--- 11,16 ----
Number of Set directories (Data/Spam/Set1, ... and Data/Ham/Set1, ...).
This is required.
+ -o section:option:value
+ set [section, option] in the options database to value
If you only want to use some of the messages in each set,
***************
*** 127,131 ****
try:
! opts, args = getopt.getopt(sys.argv[1:], 'hn:s:',
['HamTrain=', 'SpamTrain=',
'HamTest=', 'SpamTest=',
--- 129,133 ----
try:
! opts, args = getopt.getopt(sys.argv[1:], 'hn:s:o:',
['HamTrain=', 'SpamTrain=',
'HamTest=', 'SpamTest=',
***************
*** 155,158 ****
--- 157,162 ----
elif opt == '--spam-keep':
spamkeep = int(arg)
+ elif opt in ('-o', '--option'):
+ options.set_from_cmdline(arg, sys.stderr)
if args:
More information about the Spambayes-checkins
mailing list