changeset 160:3bcd097c27f2

more convenience reduce functions, muahahaha
author Jeff Hammel <k0scist@gmail.com>
date Wed, 13 May 2015 16:13:06 -0700
parents f46cfad55d7a
children 31b246a267fe
files numerics/mean.py numerics/sum.py
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/numerics/mean.py	Wed May 13 15:00:44 2015 -0700
+++ b/numerics/mean.py	Wed May 13 16:13:06 2015 -0700
@@ -16,7 +16,7 @@
 
 def main(args=sys.argv[1:]):
     """CLI"""
-    ReduceParser(mean)(*args)
+    ReduceParser(mean, description=__doc__)(*args)
 
 
 if __name__ == '__main__':
--- a/numerics/sum.py	Wed May 13 15:00:44 2015 -0700
+++ b/numerics/sum.py	Wed May 13 16:13:06 2015 -0700
@@ -4,6 +4,13 @@
 sum columns in CSV
 """
 
-import argparse
-import csv
+import sys
+from .reduce import ReduceParser
 
+def main(args=sys.argv[1:]):
+    """CLI"""
+
+    ReduceParser(sum, description=__doc__)(*args)
+
+if __name__ == '__main__':
+    main()