Salome HOME
updated copyright message
[modules/kernel.git] / bin / appliskel / salome_starter.py
index 7eb0a7e5c8421334b1546706d5045b8878441635..95f5b18c80f4e81172f737e8aac13358a0e286aa 100644 (file)
@@ -1,6 +1,4 @@
-#! /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
@@ -53,21 +51,22 @@ def initialize(launcherPath, launcherFile):
   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