[Python-checkins] python/nondist/sandbox/spambayes split.py,1.2,1.3
bwarsaw@users.sourceforge.net
bwarsaw@users.sourceforge.net
Tue, 20 Aug 2002 15:07:19 -0700
Update of /cvsroot/python/python/nondist/sandbox/spambayes
In directory usw-pr-cvs1:/tmp/cvs-serv12552
Modified Files:
split.py
Log Message:
Guido suggests a different order for the positional args.
Index: split.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/spambayes/split.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** split.py 20 Aug 2002 21:37:01 -0000 1.2
--- split.py 20 Aug 2002 22:07:17 -0000 1.3
***************
*** 7,11 ****
E.g.
! % split.py mbox20 mbox80 20 sourcembox
yields two mbox files, where mbox20 contains approximately 20% of the messages
--- 7,11 ----
E.g.
! % split.py sourcembox 20 mbox20 mbox80
yields two mbox files, where mbox20 contains approximately 20% of the messages
***************
*** 13,17 ****
randomly.
! Usage: %(programs)s [options] file1 file2 percent sourcembox
Options:
--- 13,17 ----
randomly.
! Usage: %(programs)s [options] sourcembox percent file1 file2
Options:
***************
*** 64,74 ****
try:
! bin1 = args[0]
! bin2 = args[1]
! percent = float(args[2])
if not (0 < percent < 100):
raise ValueError
percent /= 100.0
! mboxfile = args[3]
except IndexError:
usage(1, 'Not enough arguments')
--- 64,74 ----
try:
! mboxfile = args[0]
! percent = float(args[1])
if not (0 < percent < 100):
raise ValueError
percent /= 100.0
! bin1 = args[2]
! bin2 = args[3]
except IndexError:
usage(1, 'Not enough arguments')