]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
#17978 [CEA] SALOME windows minor corrections : fix for problem 1 of 5
authorrnv <rnv@opencascade.com>
Mon, 18 Nov 2019 16:02:42 +0000 (19:02 +0300)
committerrnv <rnv@opencascade.com>
Tue, 19 Nov 2019 20:08:45 +0000 (23:08 +0300)
bin/salomeContext.py

index 102364ecfea08f14ca80a24eb65ce20dacfa1d18..36961f8ef48c928e2a8833dd835d0bbe227dcf62 100755 (executable)
@@ -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