]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
MPV: set python path to the Siman scripts storage for launching they in Session pytho... BR_siman_phase1
authorbri <bri@opencascade.com>
Mon, 11 Feb 2013 05:10:52 +0000 (05:10 +0000)
committerbri <bri@opencascade.com>
Mon, 11 Feb 2013 05:10:52 +0000 (05:10 +0000)
bin/runSalome.py

index 9de65c8f6367043ae40d3e53a0e0f1f8ee5d24e4..4ce4ad47603e92abdcb1c0d5c0a43ddac578f2f9 100755 (executable)
@@ -304,7 +304,7 @@ class SessionServer(Server):
                     self.SCMD2+=['--study-hdf=%s'%self.args['study_hdf']]
                     pass
                 if simanStudyName(self.args) != "":
-                    self.SCMD2+=['--siman-study=%s'%simanStudyName(self.args)]
+                   self.SCMD2+=['--siman-study=%s'%simanStudyName(self.args)]
                     pass
                 pass
             pass
@@ -540,6 +540,12 @@ def startSalome(args, modules_list, modules_root_dir):
       myServer=NotifyServer(args,modules_root_dir)
       myServer.run()
 
+    # set siman python path before the session server launching to import scripts inside python console
+    if simanStudyName(args) != "":
+      # MPV: use os.environ here because session server is launched in separated process and sys.path in missed in this case
+      os.environ["PYTHONPATH"] = "/tmp/SimanSalome/" + args['siman_study'] + "/" + \
+        args['siman_scenario'] + "/" + args['siman_user'] + os.pathsep + os.environ["PYTHONPATH"];
+
     # Launch  Session Server (to show splash ASAP)
     #