Skip to content

Commit

Permalink
#6 Added usage and param files are passed as parameters. Work in prog…
Browse files Browse the repository at this point in the history
…ress.
  • Loading branch information
JanKott committed Dec 21, 2020
1 parent 63311e8 commit 93b0df1
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions paramDiff.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
p1 = open("params1").read()
p2 = open("params2").read()
l = open("params.txt").read()
import sys

if not len(sys.argv) == 3:
print('Usage: python3 paramDiff.py [base-params] [new-params]')
exit()

p1 = open(sys.argv[1]).read()
p2 = open(sys.argv[2]).read()
l = open("data/params.txt").read()

param_list = [ i.split(',')[0] for i in l.split('\n') ][:-1]
params_1 = [ i.split(',') for i in p1.split('\n')[:-1] if i.split(',')[0] in param_list ]
Expand Down

0 comments on commit 93b0df1

Please sign in to comment.