-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2019 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
# 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 <module>_ROOT_DIR
# and set list of used modules (without KERNEL)
modules_list = []
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"]
add_path(os.path.join(module_root_dir,"bin",salome_subdir),
"PATH")
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),
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"