From dc01f4844947809767f04ad2f305fd06b452c010 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Fri, 28 Jul 2017 13:21:49 +0200 Subject: [PATCH] Horrible hack to allow a correct load of a Telemac case file when done after some other edition, such as create case for Pytel execution. --- src/salome_hydro/telemac2d/eficas/appli.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/salome_hydro/telemac2d/eficas/appli.py b/src/salome_hydro/telemac2d/eficas/appli.py index 834af00..69b982f 100644 --- a/src/salome_hydro/telemac2d/eficas/appli.py +++ b/src/salome_hydro/telemac2d/eficas/appli.py @@ -37,6 +37,18 @@ import eficasSalome from salome.hydro.study import HydroStudyEditor +def importFirst(): + """ + Horrible hack to allow a correct load of a Telemac case file when done after + some other edition, such as create case for Pytel execution. + """ + eficasTelemacPath = os.path.join(eficasSalome.eficasConfig.eficasPath,'Telemac') + sys.path.insert(0, eficasTelemacPath) + from enum_Telemac2d_auto import TelemacdicoEn + sys.path.pop(0) + +importFirst() + class EficasForTelemac2DAppli(eficasSalome.MyEficas): """ This class launches Eficas and adds entries for the created files in -- 2.39.2