From 48a600a09e49e638b592d87a66a7e27e0e513dc8 Mon Sep 17 00:00:00 2001 From: ALEXANDER_SCHMIDT <05schmid@frodo.(none)> Date: Fri, 24 Jan 2014 13:47:29 +0100 Subject: [PATCH] ... --- meanstep.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 meanstep.py diff --git a/meanstep.py b/meanstep.py new file mode 100755 index 0000000..64f28f0 --- /dev/null +++ b/meanstep.py @@ -0,0 +1,35 @@ +#!/usr/bin/python + +""" meanstep.py + ... +""" + +import sys +import os + +results = {} + +if len(sys.argv) != 4: + print "usage: ./meanstep.py ,..., ,...," + exit(0) + +matchcols = sys.argv[2].split(",") + +for root, dirs, filenames in os.walk(sys.argv[1]): + for f in filenames: + if f[-4:] != ".dat": + continue + + with open(root + "/" + f) as inf: + for line in inf: + if line[0:1] == "#": + continue + + linecols = line.split() + matchkey = "" + for imatchcol in range(0,len(matchcols)): + matchkey = matchkey + linecols[int(matchcols[imatchcol])] + + + + #results[f[:-4]] = "tefds" -- 2.39.5