From: Gilles DAVID Date: Thu, 27 Jul 2017 15:28:27 +0000 (+0200) Subject: Merge branch 'master' into V9_dev X-Git-Tag: V9_0_0~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=66b7b8c5d71f081f82f5dad2a3221a53ba9e4ee5;p=modules%2Fkernel.git Merge branch 'master' into V9_dev Conflicts: bin/runConsole.py bin/runSession.py bin/salomeContext.py bin/setenv.py --- 66b7b8c5d71f081f82f5dad2a3221a53ba9e4ee5 diff --cc bin/runConsole.py index 1788b206c,9639291f7..78e12ee2e --- a/bin/runConsole.py +++ b/bin/runConsole.py @@@ -215,9 -214,7 +215,9 @@@ def connect(args=None, env=None) import subprocess absoluteAppliPath = os.getenv('ABSOLUTE_APPLI_PATH','') env_copy = os.environ.copy() - cmdDump=pickle.dumps(cmd,protocol=0) - cmdString=cmdDump.decode() - proc = subprocess.Popen(['python', os.path.join(absoluteAppliPath,"bin","salome","runConsole.py"), cmdString], shell=False, close_fds=True, env=env_copy) - proc = subprocess.Popen(['python', os.path.join(absoluteAppliPath,"bin","salome","runConsole.py"), pickle.dumps(cmd)], shell=False, close_fds=True, env=env_copy) ++ cmdDump = pickle.dumps(cmd, protocol=0) ++ cmdString = cmdDump.decode() ++ proc = subprocess.Popen(['python3', os.path.join(absoluteAppliPath,"bin","salome","runConsole.py"), cmdString], shell=False, close_fds=True, env=env_copy) proc.communicate() return proc.returncode # diff --cc bin/setenv.py index d699fae27,242f492cd..e36481da8 --- a/bin/setenv.py +++ b/bin/setenv.py @@@ -88,15 -89,24 +88,17 @@@ def get_config(silent=False, exeName=No # read args from launch configure xml file and command line options - #*** Test additional option - #*** import optparse - #*** help_str = "Test options addition." - #*** o_j = optparse.Option("-j", "--join", action="store_true", dest="join", help=help_str) + import launchConfigureParser args = launchConfigureParser.get_env(exeName=exeName) - #*** Test additional option - #*** args = launchConfigureParser.get_env([o_j]) - #*** if args.has_key("join"): print args["join"] + # Check variables _ROOT_DIR # and set list of used modules (without KERNEL) modules_list = [] - if args.has_key("modules"): + if "modules" in args: - modules_list += args["modules"] + modules_list += [a for a in args["modules"] if a.strip()] # KERNEL must be last in the list to locate it at the first place in PATH if args["gui"] : modules_list[:0] = ["GUI"] @@@ -175,8 -185,8 +177,8 @@@ def set_env(args, modules_list, modules "LD_LIBRARY_PATH") add_path(os.path.join(module_root_dir,"bin",salome_subdir), "PATH") - if os.path.exists(module_root_dir + "/examples") : + if os.path.exists(os.path.join(module_root_dir, "examples")): - add_path(os.path.join(module_root_dir, "examples"), + add_path(os.path.join(module_root_dir,"examples"), "PYTHONPATH") pass add_path(os.path.join(module_root_dir,"bin",salome_subdir), @@@ -220,10 -230,10 +222,10 @@@ # set trace environment variable - if not os.environ.has_key("SALOME_trace"): + if "SALOME_trace" not in os.environ: os.environ["SALOME_trace"]="local" if args['file']: - os.environ["SALOME_trace"] = "file:" + args['file'][0] + os.environ["SALOME_trace"]="file:"+args['file'][0] if args['logger']: os.environ["SALOME_trace"]="with_logger" diff --cc src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py index 2f7d481cd,b0800d53d..e4ad07863 --- a/src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py +++ b/src/LifeCycleCORBA_SWIG/TestLifeCycleCORBA.py @@@ -44,10 -44,10 +44,10 @@@ try engine=lcc.FindComponent(param,'SalomeTestComponent') engine.Coucou(1) except : - print 'lcc.FindOrLoad_Component("FactoryServer","SalomeTestComponent") failed' + print('lcc.FindOrLoad_Component("FactoryServer","SalomeTestComponent") failed') import sys - import CORBA + from omniORB import CORBA import CosNaming orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID) obj = orb.resolve_initial_references("NameService")