X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=bin%2FrunSession.py;h=c83ef01a1d4c7e3e3b18dd984d45e5338b90cb62;hb=97b8a51943a7412d4a9c8c665214ed67bd72298c;hp=5f6cc7822a7a7afcb4a340851cd076bb3f3b4005;hpb=9484eae0407296e960cb8468cf279bd87a65a41e;p=modules%2Fkernel.git diff --git a/bin/runSession.py b/bin/runSession.py index 5f6cc7822..c83ef01a1 100644 --- a/bin/runSession.py +++ b/bin/runSession.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2016 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 @@ -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] [-- ]"%exe else: @@ -216,7 +218,10 @@ def __runLocalSession(command): 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() #