From 87ae9a33e79f81a14c425397b55953f36f531b06 Mon Sep 17 00:00:00 2001 From: Anne Philipp <anne.philipp@univie.ac.at> Date: Fri, 14 Dec 2018 01:21:58 +0100 Subject: [PATCH] added possibility to write comments with '#' in to CONTROL files, either single lines with starting '#' or in the same line after parameter values --- source/python/classes/ControlFile.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/python/classes/ControlFile.py b/source/python/classes/ControlFile.py index 2fb5014..5d11c65 100644 --- a/source/python/classes/ControlFile.py +++ b/source/python/classes/ControlFile.py @@ -192,6 +192,12 @@ class ControlFile(object): # go through every line and store parameter for ldata in fdata: + if ldata and ldata[0] == '#': + # ignore comment line in control file + continue + if '#' in ldata: + # cut off comment + ldata = ldata.split('#')[0] data = ldata.split() if len(data) > 1: if 'm_' in data[0].lower(): -- GitLab