This commit is contained in:
parent
0abafb4ed0
commit
064606304a
|
@ -16,7 +16,7 @@ with open(file, 'r') as fp:
|
|||
|
||||
result = []
|
||||
step = None
|
||||
for l in lines[20:120]:
|
||||
for l in lines[20:]:
|
||||
data = l.strip().split(' ')
|
||||
prep = {}
|
||||
for item in data:
|
||||
|
@ -24,8 +24,10 @@ with open(file, 'r') as fp:
|
|||
if 'G' in prep and prep['G'] == '01':
|
||||
step = prep['G']
|
||||
if step == '01':
|
||||
if 'A' in prep:
|
||||
prep['U'] = float(prep.pop('A')) / 100
|
||||
if 'C' in prep:
|
||||
prep['U'] = float(prep.pop('C')) / 100
|
||||
prep['W'] = float(prep.pop('C')) / 100
|
||||
result.append([f"{p}{prep[p]}" for p in prep if p in ['X', 'Y', 'Z', 'U', 'V', 'W']])
|
||||
|
||||
with open(f"{file}.result", 'w') as fp:
|
||||
|
|
Loading…
Reference in New Issue