-#! /usr/bin/env python
-
-# Copyright (C) 2014 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2014-2023 CEA, EDF, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
appliPath = __detectAppliPath(launcherPath, launcherFile)
if appliPath is None:
- print "ERROR: Unable to find application folder"
- sys.exit(0)
+ print("ERROR: Unable to find application folder")
+ sys.exit(1)
appliPath = os.path.relpath(appliPath, homePath)
absoluteAppliPath = os.path.join(homePath, appliPath)
os.environ['APPLI'] = appliPath # needed to convert .sh environment files
os.environ['ABSOLUTE_APPLI_PATH'] = absoluteAppliPath
- sys.path[:0] = [os.path.join(absoluteAppliPath, "bin", "salome")]
+ sys.path[:0] = [os.path.realpath(os.path.join(absoluteAppliPath, "bin", "salome", "test"))]
+ sys.path[:0] = [os.path.realpath(os.path.join(absoluteAppliPath, "bin", "salome"))]
# define folder to store omniorb config (initially in virtual application folder)
try:
from salomeContextUtils import setOmniOrbUserPath
setOmniOrbUserPath()
- except Exception, e:
- print e
+ except Exception as e:
+ print(e)
sys.exit(1)
# End of preliminary work