From: mbs Date: Thu, 28 Mar 2024 19:45:57 +0000 (+0000) Subject: need to explicitly call python script in sub process with 'python script.py' on Windows X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fcce%2Fjfa_Porting_OCCT_780_MasterRebased;p=modules%2Fshaper.git need to explicitly call python script in sub process with 'python script.py' on Windows --- diff --git a/src/ExchangePlugin/Test/TestImportImage_3.py b/src/ExchangePlugin/Test/TestImportImage_3.py index 82b1a8974..4de0cf850 100755 --- a/src/ExchangePlugin/Test/TestImportImage_3.py +++ b/src/ExchangePlugin/Test/TestImportImage_3.py @@ -104,5 +104,9 @@ with TemporaryDirectory() as tmp_dir: # Close SALOME GUI import salome_utils import subprocess +import platform port = salome_utils.getPortNumber() -proc = subprocess.Popen(["killSalomeWithPort.py", "{}".format(port)]) +if platform.system() == "Windows": + proc = subprocess.Popen(["python", "killSalomeWithPort.py", "{}".format(port)]) +else: + proc = subprocess.Popen(["killSalomeWithPort.py", "{}".format(port)])