Feature Requests item #1081787, was opened at 2004-12-09 14:10
Message generated for change (Comment added) made by anadelonbrin
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498106&aid=1081787&group_id=61702

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
Priority: 5
Submitted By: Matthew Vickers (matthew_vickers)
Assigned to: Tony Meyer (anadelonbrin)
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.


----------------------------------------------------------------------

>Comment By: Tony Meyer (anadelonbrin)
Date: 2006-04-03 00:41

Message:
Logged In: YES 
user_id=552329

Added (slightly different code but the same effect).

(CVS is down at the moment; I'll check it in when it's back).

----------------------------------------------------------------------

Comment By: Matthew Vickers (matthew_vickers)
Date: 2005-02-03 16:15

Message:
Logged In: YES 
user_id=1174624

Hi anadelonbrin,

There was no "good" reason why we needed this except to
place the version in the email header.  I could have piped
the output through a filter but as most other command line
programs print a version with -v I thought that sb_filter
could use it.

Matt

----------------------------------------------------------------------

Comment By: Tony Meyer (anadelonbrin)
Date: 2005-02-03 15:19

Message:
Logged In: YES 
user_id=552329

sb_filter.py -h prints out the version information above the
usage information.  Is that not sufficient?  (piping the
output through some sort of filter could give just the version).

If there's some reason that just the version by itself would
be good, please let me know and I'll add it for 1.1.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=498106&aid=1081787&group_id=61702
_______________________________________________
Spambayes-bugs mailing list
[email protected]
http://mail.python.org/mailman/listinfo/spambayes-bugs

Reply via email to