-#! /usr/bin/env python
-
-# Copyright (C) 2014-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2014-2021 CEA/DEN, EDF R&D, 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
+ os.environ['APPLI'] = appliPath # needed to convert .sh environment files
os.environ['ABSOLUTE_APPLI_PATH'] = absoluteAppliPath
sys.path[:0] = [os.path.realpath(os.path.join(absoluteAppliPath, "bin", "salome", "test"))]
try:
from salomeContextUtils import setOmniOrbUserPath
setOmniOrbUserPath()
- except Exception, e:
- print e
+ except Exception as e:
+ print(e)
sys.exit(1)
# End of preliminary work