Skip to content

Commit

Permalink
changes in epanetmsxapi
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariosmsk committed Mar 24, 2024
1 parent 1b3c498 commit 53862f4
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions epyt/epanet.py
Original file line number Diff line number Diff line change
Expand Up @@ -15671,15 +15671,11 @@ def __init__(self, filename=None):
self.msx_error.argtypes = [c_int, c_char_p, c_int]

# msx opens starts here
if not os.path.exists(filename):
raise FileNotFoundError(f"File not found: {filename}")

if filename is not None:
""" Open .msx file
msx.MSXopen(filename)
msx.MSXopen(Arsenite.msx)"""
""" filename example : Arsenite.msx or use full path """
print("Opening MSX file:", filename)
if not os.path.exists(filename):
raise FileNotFoundError(f"File not found: {filename}")

filename = c_char_p(filename.encode('utf-8'))
err = self.msx_lib.MSXopen(filename)
if err != 0:
Expand All @@ -15691,10 +15687,14 @@ def __init__(self, filename=None):
# msx open ends here

def MSXopen(self, filename):
""" Open .msx file
msx.MSXopen(filename)
msx.MSXopen(Arsenite.msx)"""
""" filename example : Arsenite.msx or use full path """
"""
Open MSX file
filename - Arsenite.msx or use full path

Example:
msx.MSXopen(filename)
msx.MSXopen(Arsenite.msx)
"""
print("Opening MSX file:", filename)
if not os.path.exists(filename):
raise FileNotFoundError(f"File not found: {filename}")
Expand Down

0 comments on commit 53862f4

Please sign in to comment.