Solver: Mage: Fix comment for ST file header.

setup.py
Pierre-Antoine Rouby 2024-01-24 16:41:54 +01:00
parent 7ae64d390f
commit 4de04d1af8
2 changed files with 6 additions and 2 deletions

View File

@ -38,7 +38,11 @@ def mage_file_open(filepath, mode):
if "w" in mode:
# Write header
f.write("* This file is generated by PAMHYR, please don't modify\n")
comment = "*"
if ".ST" in filepath:
comment = "#"
f.write(f"{comment} This file is generated by PAMHYR, please don't modify\n")
return f

View File

@ -567,7 +567,7 @@ class GeometryWindow(PamhyrWindow):
def _export_to_file_st(self, filename):
with open(filename, "w+") as f:
f.write("* Exported from Pamhyr2\n")
f.write("# Exported from Pamhyr2\n")
self._export_to_file_st_reach(f, self._reach)
def _export_to_file_st_reach(self, wfile, reach):