Salome HOME
Pleiade issue 8084, note 2.
authorOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Mon, 26 May 2014 09:19:31 +0000 (11:19 +0200)
committerOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Mon, 26 May 2014 09:19:31 +0000 (11:19 +0200)
See https://forge-pleiade.der.edf.fr/issues/8084#note-2

module_generator/astcompo.py

index ca9712416e4d61eef4ea849b6285c40227d34242..b22ebe0635e4f281f60290ae0a37db29b5a220c2 100644 (file)
@@ -262,10 +262,25 @@ ARGPYT         | exec    | -     | %s
     importesuperv=""
     if self.version < (10,1,2):
       importesuperv="from E_SUPERV import SUPERV"
-    else :
+    elif self.version < (11,4,1) :
       importesuperv="""sys.path=["%s"]+sys.path
 from Execution.E_SUPERV import SUPERV
 """ % self.getAsterPythonPath()
+    else :
+      importesuperv="""
+VERS=stable
+import os.path as osp
+from asrun.run import AsRunFactory
+from asrun.config import AsterConfig
+
+run = AsRunFactory()
+path = run.get_version_path(VERS)
+cfg = AsterConfig(osp.join(path, 'config.txt'))
+pypath = cfg['REPPY'][0]
+
+sys.path.insert(0, pypath)
+from Execution.E_SUPERV import SUPERV
+"""
     return importesuperv