From 023987a1ad24c420f3c9b7bfff92fcfd81bec743 Mon Sep 17 00:00:00 2001 From: rnv Date: Mon, 18 Nov 2019 19:02:42 +0300 Subject: [PATCH] #17978 [CEA] SALOME windows minor corrections : fix for problem 1 of 5 --- bin/salomeContext.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bin/salomeContext.py b/bin/salomeContext.py index 102364ecf..36961f8ef 100755 --- a/bin/salomeContext.py +++ b/bin/salomeContext.py @@ -28,7 +28,7 @@ from parseConfigFile import parseConfigFile import tempfile import pickle import subprocess -import platform +import sys from salomeContextUtils import SalomeContextException @@ -146,9 +146,9 @@ class SalomeContext: """Append value to LD_LIBRARY_PATH environment variable""" def addToLdLibraryPath(self, value): - if platform.system() == 'Windows': + if sys.platform == 'win32': self.addToVariable('PATH', value) - elif platform.system() == 'Darwin': + elif sys.platform == 'darwin': if "LAPACK" in value: self.addToVariable('DYLD_FALLBACK_LIBRARY_PATH', value) else: @@ -344,7 +344,10 @@ class SalomeContext: print("*** Enter 'exit' (only once!) to leave SALOME context.") print("***") - cmd = ["/bin/bash"] + if sys.platform == 'win32': + cmd = ['cmd.exe'] + else: + cmd = ["/bin/bash"] proc = subprocess.Popen(cmd, shell=False, close_fds=True) proc.communicate() return proc.returncode -- 2.39.2