From 063605d5b70edd23a286e17b02a6f489a7a7ae4f Mon Sep 17 00:00:00 2001 From: Peter Teuben Date: Fri, 29 Sep 2023 16:38:47 -0400 Subject: [PATCH] put a # marker in the key file --- qtrun.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qtrun.py b/qtrun.py index c071f1a..2680878 100755 --- a/qtrun.py +++ b/qtrun.py @@ -80,6 +80,7 @@ def save(self): file_path, _ = QtWidgets.QFileDialog.getSaveFileName(self, "Save File", default_file_path, "All Files (*)") if file_path: with open(file_path, "w") as file: + file.write("# written by qtrun.py - do not edit\n") for line in contents: for key, value in line.items(): file.write(f"{key}={value}") @@ -99,6 +100,8 @@ def load(self): default_values = {} with open(file, "r") as f: for line in f: + if line[0] == '#': + continue if self.input_file_type == 'csh': line = re.sub("set","",line,count=1) label, value = line.strip().split("=")