From: bri Date: Mon, 11 Feb 2013 05:10:52 +0000 (+0000) Subject: MPV: set python path to the Siman scripts storage for launching they in Session pytho... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=534239b0ac100c1845934c41a7c5f79bfb23181c;p=modules%2Fkernel.git MPV: set python path to the Siman scripts storage for launching they in Session python console --- diff --git a/bin/runSalome.py b/bin/runSalome.py index 9de65c8f6..4ce4ad476 100755 --- a/bin/runSalome.py +++ b/bin/runSalome.py @@ -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) #