[spambayes-bugs] [ spambayes-Feature Requests-1081787 ] Adding the
version only to sb_filter.py
SourceForge.net
noreply at sourceforge.net
Thu Dec 9 02:10:18 CET 2004
Feature Requests item #1081787, was opened at 2004-12-09 12:10
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498106&aid=1081787&group_id=61702
Category: None
Group: None
Status: Open
Priority: 5
Submitted By: Matthew Vickers (matthew_vickers)
Assigned to: Nobody/Anonymous (nobody)
Summary: Adding the version only to sb_filter.py
Initial Comment:
Hi Folks,
Doing some integeration of Spambayes into our network
email gateway and I needed the version only to be
printed to the console i.e sb_filter -v. I have
modified the source of sb_filter.py to include the
version commandline option.
Mabey someone else out there needs this small
functionality or it could be placed into the CVS tree.
def version():
print >> sys.stderr, get_version_string("sb_filter"),
"with engine %s" % get_version_string()
sys.exit(1)
and in the main() function
Added a "v" to the getopt arguments
opts, args = getopt.getopt(sys.argv[1:],
'hxd:p:nfvgstGSo:',
['help', 'examples',
'option='])
Added the following into the else if statements
elif opt == '-v':
version();
Regards all.
Matt.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=498106&aid=1081787&group_id=61702
More information about the Spambayes-bugs
mailing list