From: rnv Date: Mon, 18 Nov 2019 16:02:42 +0000 (+0300) Subject: #17978 [CEA] SALOME windows minor corrections : fix for problem 1 of 5 X-Git-Tag: V9_4_0rc2^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Focc%2Ffixes_for_940;p=modules%2Fkernel.git #17978 [CEA] SALOME windows minor corrections : fix for problem 1 of 5 --- 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