From: ALEXANDER_SCHMIDT <05schmid@frodo.(none)> Date: Fri, 24 Jan 2014 12:47:29 +0000 (+0100) Subject: ... X-Git-Url: http://git.treefish.org/~alex/phys/latscripts.git/commitdiff_plain/48a600a09e49e638b592d87a66a7e27e0e513dc8 ... --- 48a600a09e49e638b592d87a66a7e27e0e513dc8 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"