import tempfile
import pickle
import subprocess
-import platform
+import sys
from salomeContextUtils import SalomeContextException
"""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:
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