Skip to content

Commit

Permalink
put a # marker in the key file
Browse files Browse the repository at this point in the history
  • Loading branch information
teuben committed Sep 29, 2023
1 parent 56a5b15 commit 063605d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions qtrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand All @@ -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("=")
Expand Down

0 comments on commit 063605d

Please sign in to comment.