From: PASCALE NOYRET Date: Tue, 4 Jan 2022 17:37:58 +0000 (+0100) Subject: ajout fonction validateFile et fichier exemple d utilisation X-Git-Tag: merge_uncertainty_odysee_1210~132 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b0a5965aa46c658a9981741cf9159dc412a46aff;p=tools%2Feficas.git ajout fonction validateFile et fichier exemple d utilisation --- diff --git a/InterfaceQT4/eficas_go.py b/InterfaceQT4/eficas_go.py index 7ae725e9..62402fdd 100755 --- a/InterfaceQT4/eficas_go.py +++ b/InterfaceQT4/eficas_go.py @@ -150,6 +150,14 @@ def genereStructure(code=None): f.write(str(texteStructure)) f.close() +def validateFile(code,fichierCata,fichier): + from Editeur import session + options=session.parse(['',]) + from .qtEficasSsIhm import AppliSsIhm + from .editorSsIhm import JDCEditorSsIhm + monEficasSsIhm=AppliSsIhm(code=code, salome=0, fichierCata=fichierCata) + monEditeur=JDCEditorSsIhm(monEficasSsIhm,fichier) + return monEditeur.jdc.isValid() def validateDataSet(code=None): #------------------------------ diff --git a/ReacteurNumerique/valideUnFichier.py b/ReacteurNumerique/valideUnFichier.py new file mode 100755 index 00000000..86593dc5 --- /dev/null +++ b/ReacteurNumerique/valideUnFichier.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +""" + Ce module sert a lancer EFICAS configure pour MAP +""" +# Modules Python +# Modules Eficas +# la on peut mettre le EFICAS_DIR +import sys,os +sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) + +from InterfaceQT4.eficas_go import validateFile +print (validateFile("ReacteurNumerique","cata_RN_EDG_PN.py","edg_REP1300_FULL_PN.comm"))