Salome HOME
projects
/
modules
/
kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New params in config_appli to handle environment modules
[modules/kernel.git]
/
bin
/
runSession.py
diff --git
a/bin/runSession.py
b/bin/runSession.py
index 5f6cc7822a7a7afcb4a340851cd076bb3f3b4005..c83ef01a1d4c7e3e3b18dd984d45e5338b90cb62 100644
(file)
--- a/
bin/runSession.py
+++ b/
bin/runSession.py
@@
-1,5
+1,5
@@
# -*- coding: iso-8859-1 -*-
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-201
5
CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-201
6
CEA/DEN, EDF R&D, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-56,7
+56,9
@@
class SessionParameters:
#
#
#
#
-def configureSession(args=[], exe=None):
+def configureSession(args=None, exe=None):
+ if args is None:
+ args = []
if exe:
usage = "Usage: %s [options] [command] [-- <extra>]"%exe
else:
if exe:
usage = "Usage: %s [options] [command] [-- <extra>]"%exe
else:
@@
-216,7
+218,10
@@
def __runLocalSession(command):
return ("".join(outmsg), "".join(errmsg))
else:
absoluteAppliPath = os.getenv('ABSOLUTE_APPLI_PATH','')
return ("".join(outmsg), "".join(errmsg))
else:
absoluteAppliPath = os.getenv('ABSOLUTE_APPLI_PATH','')
- cmd = ["/bin/bash", "--rcfile", absoluteAppliPath + "/.bashrc" ]
+ if sys.platform == "win32":
+ cmd = ["cmd", "/K", "set PROMPT=[SALOME] $P$G"]
+ else:
+ cmd = ["/bin/bash", "--rcfile", absoluteAppliPath + "/.bashrc" ]
proc = subprocess.Popen(cmd, shell=False, close_fds=True)
return proc.communicate()
#
proc = subprocess.Popen(cmd, shell=False, close_fds=True)
return proc.communicate()
#