diff options
Diffstat (limited to 'compact_pm_ovd.py')
-rwxr-xr-x | compact_pm_ovd.py | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/compact_pm_ovd.py b/compact_pm_ovd.py index 3b646ca..4670de0 100755 --- a/compact_pm_ovd.py +++ b/compact_pm_ovd.py | |||
@@ -2,17 +2,7 @@ | |||
2 | 2 | ||
3 | from os.path import splitext, basename, dirname | 3 | from os.path import splitext, basename, dirname |
4 | from optparse import OptionParser | 4 | from optparse import OptionParser |
5 | 5 | from plot import decode | |
6 | def decode(name): | ||
7 | params = {} | ||
8 | parts = name.split('_') | ||
9 | for p in parts: | ||
10 | kv = p.split('=') | ||
11 | k = kv[0] | ||
12 | v = kv[1] if len(kv) > 1 else None | ||
13 | params[k] = v | ||
14 | return params | ||
15 | |||
16 | 6 | ||
17 | def build_name(dirname, conf, wss_list): | 7 | def build_name(dirname, conf, wss_list): |
18 | if dirname == '': | 8 | if dirname == '': |
@@ -100,7 +90,7 @@ def main(args): | |||
100 | wsscmpctr.write_csv(dirname(datafile), conf) | 90 | wsscmpctr.write_csv(dirname(datafile), conf) |
101 | 91 | ||
102 | if __name__ == "__main__": | 92 | if __name__ == "__main__": |
103 | usage = "Usage: %prog list-of-file" | 93 | usage = "Usage: %prog <list of files, _sorted_ by WSS>" |
104 | parser = OptionParser(usage=usage) | 94 | parser = OptionParser(usage=usage) |
105 | (options, args) = parser.parse_args() | 95 | (options, args) = parser.parse_args() |
106 | if len(args) < 1: | 96 | if len(args) < 1: |