Closed bhzunami closed 7 years ago
probably as a new member function of Femag-class? As currently needed by femagtest to figure out the model name
with open(os.path.join(self.workdir,
'FEMAG-FSL.log')) as f:
for l in f:
if l.startswith('New model') or l.startswith('Load model'):
model = l.split()[2].replace('"', '').replace(',', '')
break
Read a value from logfile with a given regex/pattern