[Spambayes-checkins] spambayes/scripts sb_dbexpimp.py,1.4,1.5
Skip Montanaro
montanaro at users.sourceforge.net
Wed Jan 14 22:18:08 EST 2004
Update of /cvsroot/spambayes/spambayes/scripts
In directory sc8-pr-cvs1:/tmp/cvs-serv13021
Modified Files:
sb_dbexpimp.py
Log Message:
add -o option to allow users to set arbitrary global options from the
command line
Index: sb_dbexpimp.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/scripts/sb_dbexpimp.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** sb_dbexpimp.py 16 Dec 2003 05:06:33 -0000 1.4
--- sb_dbexpimp.py 15 Jan 2004 03:18:06 -0000 1.5
***************
*** 55,58 ****
--- 55,61 ----
wordinfo will be merged into an existing database.
Run dbExpImp -h for more information.
+ -o: section:option:value :
+ set [section, option] in the options database to value
+
-h : help
***************
*** 233,237 ****
try:
! opts, args = getopt.getopt(sys.argv[1:], 'iehmvd:D:f:')
except getopt.error, msg:
print >>sys.stderr, str(msg) + '\n\n' + __doc__
--- 236,240 ----
try:
! opts, args = getopt.getopt(sys.argv[1:], 'iehmvd:D:f:o:')
except getopt.error, msg:
print >>sys.stderr, str(msg) + '\n\n' + __doc__
***************
*** 266,269 ****
--- 269,274 ----
elif opt == '-v':
options["globals", "verbose"] = True
+ elif opt in ('-o', '--option'):
+ options.set_from_cmdline(arg, sys.stderr)
if (dbFN and flatFN):
More information about the Spambayes-checkins
mailing list