From 2b7b89ffc07f12c9e402a3a05470000125a1b931 Mon Sep 17 00:00:00 2001 From: cvs2git Date: Wed, 22 May 2002 09:27:39 +0000 Subject: [PATCH] This commit was manufactured by cvs2git to create tag 'FR_livr_CD_22_05'. Sprout from I26 2002-03-26 09:08:47 UTC eficas 'Version initiale de EFICAS 1.2' Cherrypick from master 2002-05-22 09:27:38 UTC eficas 'CCAR: modification de la procedure d'installation : install.py et de': Accas/A_ASSD.py Accas/A_AU_MOINS_UN.py Accas/A_A_CLASSER.py Accas/A_BLOC.py Accas/A_ENSEMBLE.py Accas/A_ETAPE.py Accas/A_EVAL.py Accas/A_EXCLUS.py Accas/A_FACT.py Accas/A_FORM.py Accas/A_FORM_ETAPE.py Accas/A_JDC.py Accas/A_JDC_CATA.py Accas/A_MACRO.py Accas/A_MACRO_ETAPE.py Accas/A_MCBLOC.py Accas/A_MCFACT.py Accas/A_MCLIST.py Accas/A_MCNUPLET.py Accas/A_MCSIMP.py Accas/A_NUPLET.py Accas/A_OPER.py Accas/A_PRESENT_ABSENT.py Accas/A_PRESENT_PRESENT.py Accas/A_PROC.py Accas/A_PROC_ETAPE.py Accas/A_SIMP.py Accas/A_UN_PARMI.py Accas/__init__.py Aster/INSTALL Aster/LICENSE.TERMS Aster/README Aster/editeur.ini Aster/eficas_aster.py Aster/prefs.py Aster/sdist.py Editeur/Interp.py Editeur/Objecttreeitem.py Editeur/__init__.py Editeur/analyse_catalogue.py Editeur/appli.py Editeur/browser.py Editeur/bureau.py Editeur/catabrowser.py Editeur/cataediteur.py Editeur/centerwindow.py Editeur/compobloc.py Editeur/compocomm.py Editeur/compocommandecomm.py Editeur/compofact.py Editeur/compoformule.py Editeur/compojdc.py Editeur/compomacro.py Editeur/compomclist.py Editeur/componiveau.py Editeur/componuplet.py Editeur/compooper.py Editeur/compoparam.py Editeur/compoparameval.py Editeur/compoproc.py Editeur/composimp.py Editeur/configuration.py Editeur/definition_cata.py Editeur/eficas.py Editeur/eficas_go.py Editeur/faq.py Editeur/fenetre_mc_inconnus.py Editeur/fontes.py Editeur/images.py Editeur/import_code.py Editeur/jdcdisplay.py Editeur/menubar.py Editeur/options.py Editeur/panels.py Editeur/readercata.py Editeur/splash.py Editeur/statusbar.py Editeur/toolbar.py Editeur/tooltip.py Editeur/treeitemincanvas.py Editeur/treewidget.py Editeur/utils.py Editeur/widgets.py Exemples/ex11/main.py Extensions/__init__.py Extensions/commande_comm.py Extensions/commentaire.py Extensions/etape_niveau.py Extensions/interpreteur_formule.py Extensions/jdc.py Extensions/mcnuplet.py Extensions/niveau.py Extensions/nuplet.py Extensions/parametre.py Extensions/parametre_eval.py Extensions/pluginloader.py Ihm/I_ASSD.py Ihm/I_A_CLASSER.py Ihm/I_ENTITE.py Ihm/I_ETAPE.py Ihm/I_EXCLUS.py Ihm/I_FONCTION.py Ihm/I_FORM_ETAPE.py Ihm/I_JDC.py Ihm/I_JDC_CATA.py Ihm/I_MACRO_ETAPE.py Ihm/I_MCBLOC.py Ihm/I_MCCOMPO.py Ihm/I_MCFACT.py Ihm/I_MCLIST.py Ihm/I_MCSIMP.py Ihm/I_OBJECT.py Ihm/I_PRESENT_ABSENT.py Ihm/I_PRESENT_PRESENT.py Ihm/I_PROC_ETAPE.py Ihm/I_REGLE.py Ihm/I_UN_PARMI.py Ihm/__init__.py Installation/Doc_technique_install.doc Installation/README Installation/README_install Installation/install.py Minicode/cata_saturne.py Minicode/eficas_mini.py Minicode/prefs.py Tools/__init__.py Validation/V_ETAPE.py Validation/V_MACRO_ETAPE.py convert/Parserv5/Translate.py convert/Parserv5/__init__.py convert/Parserv5/conv.py convert/Parserv5/tables.py convert/Parserv5/tables.tag convert/__init__.py convert/convert_asterv5.py convert/convert_ini.py convert/convert_pyth.py convert/convert_python.py convert/parseur_python.py generator/Formatage.py generator/__init__.py generator/generator_aplat.py generator/generator_asterv5.py generator/generator_ini.py generator/generator_pyth.py generator/generator_python.py --- Accas/A_ASSD.py | 49 ++ Accas/A_AU_MOINS_UN.py | 19 + Accas/A_A_CLASSER.py | 19 + Accas/A_BLOC.py | 19 + Accas/A_ENSEMBLE.py | 19 + Accas/A_ETAPE.py | 19 + Accas/A_EVAL.py | 19 + Accas/A_EXCLUS.py | 19 + Accas/A_FACT.py | 19 + Accas/A_FORM.py | 19 + Accas/A_FORM_ETAPE.py | 19 + Accas/A_JDC.py | 21 + Accas/A_JDC_CATA.py | 19 + Accas/A_MACRO.py | 19 + Accas/A_MACRO_ETAPE.py | 19 + Accas/A_MCBLOC.py | 19 + Accas/A_MCFACT.py | 19 + Accas/A_MCLIST.py | 19 + Accas/A_MCNUPLET.py | 19 + Accas/A_MCSIMP.py | 19 + Accas/A_NUPLET.py | 19 + Accas/A_OPER.py | 19 + Accas/A_PRESENT_ABSENT.py | 19 + Accas/A_PRESENT_PRESENT.py | 19 + Accas/A_PROC.py | 19 + Accas/A_PROC_ETAPE.py | 19 + Accas/A_SIMP.py | 19 + Accas/A_UN_PARMI.py | 19 + Accas/__init__.py | 29 +- Aster/INSTALL | 36 + Aster/LICENSE.TERMS | 21 + Aster/README | 2 + Aster/editeur.ini | 22 +- Aster/eficas_aster.py | 20 + Aster/prefs.py | 57 ++ Aster/sdist.py | 118 +++ Editeur/Interp.py | 20 +- Editeur/Objecttreeitem.py | 25 + Editeur/__init__.py | 19 + Editeur/analyse_catalogue.py | 24 +- Editeur/appli.py | 20 + Editeur/browser.py | 19 + Editeur/bureau.py | 45 +- Editeur/catabrowser.py | 24 +- Editeur/cataediteur.py | 24 +- Editeur/centerwindow.py | 19 + Editeur/compobloc.py | 20 +- Editeur/compocomm.py | 20 +- Editeur/compocommandecomm.py | 20 +- Editeur/compofact.py | 20 +- Editeur/compoformule.py | 20 +- Editeur/compojdc.py | 22 +- Editeur/compomacro.py | 34 +- Editeur/compomclist.py | 50 +- Editeur/componiveau.py | 20 +- Editeur/componuplet.py | 24 +- Editeur/compooper.py | 40 +- Editeur/compoparam.py | 20 +- Editeur/compoparameval.py | 20 +- Editeur/compoproc.py | 24 +- Editeur/composimp.py | 304 +++++--- Editeur/configuration.py | 19 + Editeur/definition_cata.py | 20 +- Editeur/eficas.py | 24 +- Editeur/eficas_go.py | 19 + Editeur/faq.py | 19 + Editeur/fenetre_mc_inconnus.py | 38 +- Editeur/fontes.py | 19 + Editeur/images.py | 19 + Editeur/import_code.py | 19 + Editeur/jdcdisplay.py | 62 +- Editeur/menubar.py | 32 +- Editeur/options.py | 19 + Editeur/panels.py | 47 +- Editeur/readercata.py | 19 + Editeur/splash.py | 19 + Editeur/statusbar.py | 19 + Editeur/toolbar.py | 19 + Editeur/tooltip.py | 19 + Editeur/treeitemincanvas.py | 21 +- Editeur/treewidget.py | 67 +- Editeur/utils.py | 19 + Editeur/widgets.py | 20 +- Exemples/ex11/main.py | 10 + Extensions/__init__.py | 19 + Extensions/commande_comm.py | 37 +- Extensions/commentaire.py | 26 + Extensions/etape_niveau.py | 19 + Extensions/interpreteur_formule.py | 22 +- Extensions/jdc.py | 19 + Extensions/mcnuplet.py | 20 + Extensions/niveau.py | 19 + Extensions/nuplet.py | 19 + Extensions/parametre.py | 23 +- Extensions/parametre_eval.py | 22 + Extensions/pluginloader.py | 19 + Ihm/I_ASSD.py | 23 + Ihm/I_A_CLASSER.py | 19 + Ihm/I_ENTITE.py | 19 + Ihm/I_ETAPE.py | 143 +++- Ihm/I_EXCLUS.py | 22 +- Ihm/I_FONCTION.py | 41 ++ Ihm/I_FORM_ETAPE.py | 28 + Ihm/I_JDC.py | 164 ++++- Ihm/I_JDC_CATA.py | 19 + Ihm/I_MACRO_ETAPE.py | 80 +++ Ihm/I_MCBLOC.py | 19 + Ihm/I_MCCOMPO.py | 88 ++- Ihm/I_MCFACT.py | 19 + Ihm/I_MCLIST.py | 116 ++- Ihm/I_MCSIMP.py | 148 +++- Ihm/I_OBJECT.py | 44 ++ Ihm/I_PRESENT_ABSENT.py | 24 +- Ihm/I_PRESENT_PRESENT.py | 19 + Ihm/I_PROC_ETAPE.py | 55 ++ Ihm/I_REGLE.py | 19 + Ihm/I_UN_PARMI.py | 22 +- Ihm/__init__.py | 19 + Installation/Doc_technique_install.doc | Bin 0 -> 49152 bytes Installation/README | 30 + Installation/README_install | 40 ++ Installation/install.py | 949 +++++++++++++++++++++++++ Minicode/cata_saturne.py | 324 ++++++++- Minicode/eficas_mini.py | 37 +- Minicode/prefs.py | 1 + Tools/__init__.py | 20 +- Validation/V_ETAPE.py | 8 +- Validation/V_MACRO_ETAPE.py | 8 +- convert/Parserv5/Translate.py | 20 + convert/Parserv5/__init__.py | 20 + convert/Parserv5/conv.py | 25 +- convert/Parserv5/tables.py | 44 +- convert/Parserv5/tables.tag | 43 +- convert/__init__.py | 19 + convert/convert_asterv5.py | 19 + convert/convert_ini.py | 19 + convert/convert_pyth.py | 19 + convert/convert_python.py | 19 + convert/parseur_python.py | 20 +- generator/Formatage.py | 19 + generator/__init__.py | 19 + generator/generator_aplat.py | 23 +- generator/generator_asterv5.py | 19 + generator/generator_ini.py | 19 + generator/generator_pyth.py | 19 + generator/generator_python.py | 23 + 146 files changed, 5241 insertions(+), 352 deletions(-) create mode 100644 Accas/A_ASSD.py create mode 100644 Aster/INSTALL create mode 100644 Aster/LICENSE.TERMS create mode 100644 Aster/README create mode 100644 Aster/sdist.py create mode 100644 Ihm/I_ASSD.py create mode 100644 Ihm/I_FONCTION.py create mode 100755 Installation/Doc_technique_install.doc create mode 100755 Installation/README create mode 100755 Installation/README_install create mode 100755 Installation/install.py diff --git a/Accas/A_ASSD.py b/Accas/A_ASSD.py new file mode 100644 index 00000000..b9661c45 --- /dev/null +++ b/Accas/A_ASSD.py @@ -0,0 +1,49 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + +from Ihm import I_ASSD +from Ihm import I_FONCTION +from Noyau import N_ASSD +from Noyau import N_GEOM +from Noyau import N_FONCTION +from Noyau import N_CO + +# On ajoute la classe ASSD dans l'héritage multiple pour recréer +# une hiérarchie d'héritage identique à celle de Noyau +# pour faire en sorte que isinstance(o,ASSD) marche encore après +# dérivation + +class ASSD(N_ASSD.ASSD,I_ASSD.ASSD):pass + +class assd(N_ASSD.assd,I_ASSD.ASSD,ASSD):pass + +class FONCTION(N_FONCTION.FONCTION,I_FONCTION.FONCTION,ASSD): + def __init__(self,etape=None,sd=None,reg='oui'): + N_FONCTION.FONCTION.__init__(self,etape=etape,sd=sd,reg=reg) + I_FONCTION.FONCTION.__init__(self,etape=etape,sd=sd,reg=reg) + +class fonction(N_FONCTION.fonction,I_FONCTION.fonction,ASSD): + def __init__(self,etape=None,sd=None,reg='oui'): + N_FONCTION.fonction.__init__(self,etape=etape,sd=sd,reg=reg) + I_FONCTION.fonction.__init__(self,etape=etape,sd=sd,reg=reg) + +class GEOM(N_GEOM.GEOM,I_ASSD.ASSD,ASSD):pass +class geom(N_GEOM.geom,I_ASSD.ASSD,ASSD):pass +class CO(N_CO.CO,I_ASSD.ASSD,ASSD):pass diff --git a/Accas/A_AU_MOINS_UN.py b/Accas/A_AU_MOINS_UN.py index d7c525b0..eb194670 100644 --- a/Accas/A_AU_MOINS_UN.py +++ b/Accas/A_AU_MOINS_UN.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_REGLE from Validation import V_AU_MOINS_UN from Ihm import I_REGLE diff --git a/Accas/A_A_CLASSER.py b/Accas/A_A_CLASSER.py index c3b32deb..b522b2cd 100644 --- a/Accas/A_A_CLASSER.py +++ b/Accas/A_A_CLASSER.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_REGLE from Validation import V_A_CLASSER from Ihm import I_A_CLASSER diff --git a/Accas/A_BLOC.py b/Accas/A_BLOC.py index 5b341d6c..d8e16e74 100644 --- a/Accas/A_BLOC.py +++ b/Accas/A_BLOC.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_BLOC from Ihm import I_ENTITE import A_MCBLOC diff --git a/Accas/A_ENSEMBLE.py b/Accas/A_ENSEMBLE.py index 6675920b..e9ebac78 100644 --- a/Accas/A_ENSEMBLE.py +++ b/Accas/A_ENSEMBLE.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_REGLE from Validation import V_ENSEMBLE from Ihm import I_REGLE diff --git a/Accas/A_ETAPE.py b/Accas/A_ETAPE.py index cfd20bd9..512a3648 100644 --- a/Accas/A_ETAPE.py +++ b/Accas/A_ETAPE.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_ETAPE from Validation import V_ETAPE from Ihm import I_ETAPE diff --git a/Accas/A_EVAL.py b/Accas/A_EVAL.py index dff258a9..ab40f123 100644 --- a/Accas/A_EVAL.py +++ b/Accas/A_EVAL.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_EVAL class EVAL(N_EVAL.EVAL): diff --git a/Accas/A_EXCLUS.py b/Accas/A_EXCLUS.py index 5473d01a..5bbf943e 100644 --- a/Accas/A_EXCLUS.py +++ b/Accas/A_EXCLUS.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_REGLE from Validation import V_EXCLUS from Ihm import I_EXCLUS diff --git a/Accas/A_FACT.py b/Accas/A_FACT.py index d40a9c59..b2c8998e 100644 --- a/Accas/A_FACT.py +++ b/Accas/A_FACT.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_FACT from Ihm import I_ENTITE import A_MCFACT diff --git a/Accas/A_FORM.py b/Accas/A_FORM.py index 132a24b9..ea61db3e 100644 --- a/Accas/A_FORM.py +++ b/Accas/A_FORM.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_FORM from Ihm import I_ENTITE import A_FORM_ETAPE diff --git a/Accas/A_FORM_ETAPE.py b/Accas/A_FORM_ETAPE.py index 9c6483bd..af4d7cf0 100644 --- a/Accas/A_FORM_ETAPE.py +++ b/Accas/A_FORM_ETAPE.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_FORM_ETAPE from Validation import V_MACRO_ETAPE from Ihm import I_FORM_ETAPE diff --git a/Accas/A_JDC.py b/Accas/A_JDC.py index b709e01f..9216fe5a 100644 --- a/Accas/A_JDC.py +++ b/Accas/A_JDC.py @@ -1,9 +1,30 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_JDC from Validation import V_JDC from Extensions import jdc from Ihm import I_JDC class JDC(jdc.JDC,I_JDC.JDC,V_JDC.JDC,N_JDC.JDC): + from A_ASSD import CO,assd + def __init__(self,*pos,**args): N_JDC.JDC.__init__(self,*pos,**args) V_JDC.JDC.__init__(self) diff --git a/Accas/A_JDC_CATA.py b/Accas/A_JDC_CATA.py index 0a810dc3..10cf409e 100644 --- a/Accas/A_JDC_CATA.py +++ b/Accas/A_JDC_CATA.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_JDC_CATA import A_JDC from Ihm import I_JDC_CATA diff --git a/Accas/A_MACRO.py b/Accas/A_MACRO.py index 311769f8..d4e3fd1d 100644 --- a/Accas/A_MACRO.py +++ b/Accas/A_MACRO.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_MACRO from Ihm import I_ENTITE import A_MACRO_ETAPE diff --git a/Accas/A_MACRO_ETAPE.py b/Accas/A_MACRO_ETAPE.py index 29463bd5..9613ebb0 100644 --- a/Accas/A_MACRO_ETAPE.py +++ b/Accas/A_MACRO_ETAPE.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_MACRO_ETAPE from Validation import V_MACRO_ETAPE from Ihm import I_MACRO_ETAPE diff --git a/Accas/A_MCBLOC.py b/Accas/A_MCBLOC.py index 3f931840..963ae8f1 100644 --- a/Accas/A_MCBLOC.py +++ b/Accas/A_MCBLOC.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_MCBLOC from Validation import V_MCBLOC from Ihm import I_MCBLOC diff --git a/Accas/A_MCFACT.py b/Accas/A_MCFACT.py index 96d172a6..5a1b2a96 100644 --- a/Accas/A_MCFACT.py +++ b/Accas/A_MCFACT.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_MCFACT from Validation import V_MCFACT from Ihm import I_MCFACT diff --git a/Accas/A_MCLIST.py b/Accas/A_MCLIST.py index e3fba40a..d2874c59 100644 --- a/Accas/A_MCLIST.py +++ b/Accas/A_MCLIST.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_MCLIST from Validation import V_MCLIST from Ihm import I_MCLIST diff --git a/Accas/A_MCNUPLET.py b/Accas/A_MCNUPLET.py index 49bfa75b..76258bae 100644 --- a/Accas/A_MCNUPLET.py +++ b/Accas/A_MCNUPLET.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Extensions import mcnuplet from Ihm import I_MCCOMPO diff --git a/Accas/A_MCSIMP.py b/Accas/A_MCSIMP.py index 35854885..b517eb65 100644 --- a/Accas/A_MCSIMP.py +++ b/Accas/A_MCSIMP.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_MCSIMP from Validation import V_MCSIMP from Ihm import I_MCSIMP diff --git a/Accas/A_NUPLET.py b/Accas/A_NUPLET.py index 1d19c2c0..6c1c5f4c 100644 --- a/Accas/A_NUPLET.py +++ b/Accas/A_NUPLET.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Extensions import nuplet import A_MCLIST diff --git a/Accas/A_OPER.py b/Accas/A_OPER.py index f7c6107b..50e3d340 100644 --- a/Accas/A_OPER.py +++ b/Accas/A_OPER.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_OPER from Ihm import I_ENTITE import A_ETAPE diff --git a/Accas/A_PRESENT_ABSENT.py b/Accas/A_PRESENT_ABSENT.py index ac2b0b30..fc77397c 100644 --- a/Accas/A_PRESENT_ABSENT.py +++ b/Accas/A_PRESENT_ABSENT.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_REGLE from Validation import V_PRESENT_ABSENT from Ihm import I_PRESENT_ABSENT diff --git a/Accas/A_PRESENT_PRESENT.py b/Accas/A_PRESENT_PRESENT.py index 96f52fd6..bb14edfb 100644 --- a/Accas/A_PRESENT_PRESENT.py +++ b/Accas/A_PRESENT_PRESENT.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_REGLE from Validation import V_PRESENT_PRESENT from Ihm import I_PRESENT_PRESENT diff --git a/Accas/A_PROC.py b/Accas/A_PROC.py index d0b56b07..2602a54d 100644 --- a/Accas/A_PROC.py +++ b/Accas/A_PROC.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_PROC from Ihm import I_ENTITE import A_PROC_ETAPE diff --git a/Accas/A_PROC_ETAPE.py b/Accas/A_PROC_ETAPE.py index 9d7c0f89..26836709 100644 --- a/Accas/A_PROC_ETAPE.py +++ b/Accas/A_PROC_ETAPE.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_PROC_ETAPE from Validation import V_PROC_ETAPE from Ihm import I_PROC_ETAPE diff --git a/Accas/A_SIMP.py b/Accas/A_SIMP.py index 3cafb492..898c23bc 100644 --- a/Accas/A_SIMP.py +++ b/Accas/A_SIMP.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_SIMP from Ihm import I_ENTITE import A_MCSIMP diff --git a/Accas/A_UN_PARMI.py b/Accas/A_UN_PARMI.py index ee7a5058..55b281d3 100644 --- a/Accas/A_UN_PARMI.py +++ b/Accas/A_UN_PARMI.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_REGLE from Validation import V_UN_PARMI from Ihm import I_UN_PARMI diff --git a/Accas/__init__.py b/Accas/__init__.py index b61776b3..f3930531 100644 --- a/Accas/__init__.py +++ b/Accas/__init__.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce package contient les classes qui seront effectivement utilisées dans les applications. C'est dans ce package que sont réalisées les combinaisons de classes de base @@ -39,11 +58,11 @@ from A_EXCLUS import EXCLUS from A_ENSEMBLE import ENSEMBLE from A_A_CLASSER import A_CLASSER -from Noyau.N_ASSD import ASSD,assd -from Noyau.N_GEOM import GEOM,geom -from Noyau.N_FONCTION import FONCTION -from Noyau.N_FONCTION import fonction -from Noyau.N_CO import CO +from A_ASSD import ASSD,assd +from A_ASSD import GEOM,geom +from A_ASSD import FONCTION, fonction +from A_ASSD import CO + from Noyau.N__F import _F from Noyau.N_Exception import AsException diff --git a/Aster/INSTALL b/Aster/INSTALL new file mode 100644 index 00000000..d4a961f5 --- /dev/null +++ b/Aster/INSTALL @@ -0,0 +1,36 @@ + + +1- Installation standard + +Pour installer EFICAS a partir de la distribution : .tgz +faire : + tar xzvf .tgz + +ce qui a pour effet de créer un répertoire de nom . + +Tel que Eficas est prêt à etre executé mais il est conseillé d'utiliser la procédure +d'installation install.py qui teste la bonne installation des prérequis et permet de +personnaliser l'installation (lire les instructions dans README_install). + +ATTENTION : +Si Eficas est installé dans un répertoire particulier d'administration +dans lequel les utilisateurs n'ont pas le droit d'écriture, il faut que +l'administrateur lance Eficas pour générer +les fichiers et catalogues compilés .pyc et _pickled.py + +2- Utilisation d'Eficas + +Pour utiliser Eficas, aller dans le répertoire Aster et faire : + python eficas_aster.py + +3- Installation avec un noyau pré-installé + +Aller dans le répertoire Aster du répertoire Eficas +et modifier le fichier prefs.py comme suit : +Mettre dans la variable CODE_PATH le chemin absolu vers +le répertoire contenant les deux répertoires Noyau et Validation que vous voulez +utiliser à la place de ceux fournis dans la livraison d'Eficas + +Pour changer les catalogues, modifier le fichier editeur.ini dans le répertoire Aster + + diff --git a/Aster/LICENSE.TERMS b/Aster/LICENSE.TERMS new file mode 100644 index 00000000..8c88a1e5 --- /dev/null +++ b/Aster/LICENSE.TERMS @@ -0,0 +1,21 @@ + ====================================================================== + THIS PROGRAM IS FREE SOFTWARE. YOU CAN REDISTRIBUTE IT AND/OR MODIFY + IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY + THE FREE SOFTWARE FOUNDATION, EITHER VERSION 2 OF THE LICENSE, AND + ANY LATER VERSION. + THIS PROGRAM 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 GENERAL PUBLIC LICENSE FOR MORE DETAILS. + ====================================================================== + TRADUCTION EDF ( POUR INFORMATION ) + ====================================================================== + CE PROGRAMME EST UN LOGICIEL LIBRE. VOUS POUVEZ LE DIFFUSER ET/OU LE + MODIFIER SELON LES DISPOSITIONS DE LA LICENCE GRAND PUBLIC GNU (GPL) + TELLE QU'ELLE EST PUBLIEE PAR LA FREE SOFTWARE FOUNDATION, VERSION 2 + DE LA LICENCE ET TOUTE VERSION ULTERIEURE. + CE PROGRAMME EST DIFFUSE AVEC L'ESPOIR QU'IL SERA UTILE, MAIS SANS + GARANTIE, SANS MEME LA GARANTIE IMPLICITE DE QUALIFICATION DE MISE SUR + LE MARCHE OU D'ADAPTATION A UNE UTILISATION PARTICULIERE. + VOIR POUR DE PLUS AMPLES DETAILS LA LICENCE GRAND PUBLIC GNU (GPL) + ====================================================================== diff --git a/Aster/README b/Aster/README new file mode 100644 index 00000000..0597ecbb --- /dev/null +++ b/Aster/README @@ -0,0 +1,2 @@ + +Pour installer EFICAS voir dans le fichier INSTALL diff --git a/Aster/editeur.ini b/Aster/editeur.ini index e86dc069..d1774e59 100644 --- a/Aster/editeur.ini +++ b/Aster/editeur.ini @@ -1,3 +1,23 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + import os import prefs @@ -16,7 +36,7 @@ rep_travail = "/tmp" # Choix des catalogues rep_mat="bidon" -catalogues = (('ASTER','v5',os.path.join(rep_cata,'cata_STA5.py'),'asterv5'), +catalogues = (#('ASTER','v5',os.path.join(rep_cata,'cata_STA5.py'),'asterv5'), ('ASTER','v6',os.path.join(rep_cata,'cata_STA6.py'),'python','defaut'), ) diff --git a/Aster/eficas_aster.py b/Aster/eficas_aster.py index 2debb64d..ca862a94 100755 --- a/Aster/eficas_aster.py +++ b/Aster/eficas_aster.py @@ -1,4 +1,24 @@ #!/usr/bin/env python +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + """ Ce module sert à lancer EFICAS configuré pour Code_Aster """ diff --git a/Aster/prefs.py b/Aster/prefs.py index f3d82ae8..78c10406 100644 --- a/Aster/prefs.py +++ b/Aster/prefs.py @@ -1,3 +1,23 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + import os # REPINI sert à localiser le fichier editeur.ini @@ -19,3 +39,40 @@ CODE_PATH = None # Par défaut on utilise le répertoire icons dans Editeur ICONDIR=os.path.join(INSTALLDIR,'Editeur','icons') +labels= ('Fichier','Edition','Jeu de commandes', + # 'Catalogue','Browsers','Options' + ) + +extensions=['readercata','bureau', + # 'browser','options' + ] + +menu_defs={ 'bureau': [ + ('Fichier',[ + ('Nouveau','newJDC'), + ('Ouvrir','openJDC'), + ('Enregistrer','saveJDC'), + ('Enregistrer sous','saveasJDC'), + None, + ('Fermer','closeJDC'), + ('Quitter','exitEFICAS'), + ] + ), + ('Edition',[ + ('Copier','copy'), + ('Couper','cut'), + ('Coller','paste'), + ] + ), + ('Jeu de commandes',[ + ('Rapport de validation','visuCRJDC'), + # ('Fichier à plat','visu_a_plat'), + ('Fichier format v6','visuJDC_py'), + ('Fichier source','visu_txt_brut_JDC'), + ('Paramètres Eficas','affichage_fichier_ini'), + ('Mots-clés inconnus','mc_inconnus'), + ] + ), + ] + } + diff --git a/Aster/sdist.py b/Aster/sdist.py new file mode 100644 index 00000000..3266d6c1 --- /dev/null +++ b/Aster/sdist.py @@ -0,0 +1,118 @@ +""" + Ce module sert à construire les distributions d'EFICAS en fonction + du tag CVS courant + Les distributions sont : + - un tar.gz pour UNIX ne contenant pas mxTextTools + - un zip pour Windows contenant mx TextTools préinstallé + L'utilisation de ce module est la suivante : + 1- Se mettre dans un répertoire de travail + 2- Configurer son environnement pour utiliser le référentiel CVS EFICAS + 3- Exporter les sources d'EficasV1 par la commande : + cvs export -r TAG -d Eficas_export EficasV1 + ou TAG est le tag CVS de la version que l'on veut distribuer (par exemple V1_1p1) + 4- Copier le répertoire fourni par Aster (ACCAS6.2.0) au meme niveau que Eficas_export + 5- Aller dans le répertoire Eficas_export + 6- Executer le script sdist.py + python sdist.py + Ce qui a pour effet de creer un repertoire dist contenant les 2 distributions + et de les copier dans le répertoire indiqué par dir_download s'il est accessible + +""" +import os,shutil,glob,sys +import types + +version="$Name: $"[7:-2] or 'Test1_2' +# ==========Path du noyau fourni par Aster==================== +path_Noyau="../../Accas6.3.0" +# ============================================================ +nom_distrib="Eficas"+version+"AsterSTA6" +path_distrib=os.path.join("dist",nom_distrib) +path_TextTools="/home/eficas/pkg/mxTools/egenix2.0.2pourWindows/mx/TextTools" +dir_download= "/home/eficas/WWW/telechargement/eficas" + +def main(): + if os.path.isdir('dist'):shutil.rmtree('dist') + + copyfiles('.',path_distrib,['README','LICENSE.TERMS','INSTALL']) + + copyfiles('../Editeur',os.path.join(path_distrib,'Editeur'),['*.py','faqs.txt']) + copyfiles('../Ihm',os.path.join(path_distrib,'Ihm'),['*.py']) + copyfiles('../Extensions',os.path.join(path_distrib,'Extensions'),['*.py']) + copyfiles('../Accas',os.path.join(path_distrib,'Accas'),['*.py']) + copyfiles('../Aster',os.path.join(path_distrib,'Aster'),['prefs.py', + 'editeur.ini', + 'eficas_aster.py', + ]) + copyfiles('../convert',os.path.join(path_distrib,'convert'),['*.py']) + copyfiles('../convert/Parserv5',os.path.join(path_distrib,'convert','Parserv5'),['*.py']) + + copyfiles('../generator',os.path.join(path_distrib,'generator'),['*.py']) + + copyfiles('../Editeur/icons',os.path.join(path_distrib,'Editeur','icons'),['*.gif']) + + copyfiles(os.path.join(path_Noyau,'Noyau'),os.path.join(path_distrib,'Noyau'),['*.py']) + copyfiles(os.path.join(path_Noyau,'Validation'),os.path.join(path_distrib,'Validation'),['*.py']) + copyfiles(os.path.join(path_Noyau,'Cata'),os.path.join(path_distrib,'Aster','Cata'),['*.py', + ]) + + copyfiles('../Tools',os.path.join(path_distrib,'Tools'),['*.py']) + copyfiles('../Tools/foztools',os.path.join(path_distrib,'Tools','foztools'),['*.py']) + + copyfiles('../Installation',path_distrib,['README_install','install.py']) + + tarball= maketarball('dist',nom_distrib,nom_distrib) + try: + shutil.copy(tarball,dir_download) + except: + print "Repertoire de download inconnu : ",dir_download + + try: + shutil.copytree(path_TextTools,os.path.join(path_distrib,'Tools','TextTools')) + except: + print "Impossible de recuperer mxTextTools : ",dir_download + sys.exit(1) + + zipfile= makezipfile('dist',nom_distrib,nom_distrib) + try: + shutil.copy(zipfile,dir_download) + except: + print "Repertoire de download inconnu : ",dir_download + +def make_dir(dir_cible): + if type(dir_cible) is not types.StringType: + raise "make_dir : dir_cible doit etre une string (%s)" % `dir_cible` + head,tail=os.path.split(dir_cible) + tails=[tail] + while head and tail and not os.path.isdir(head): + head,tail=os.path.split(head) + tails.insert(0, tail) + + for d in tails: + head = os.path.join(head, d) + if not os.path.isdir(head):os.mkdir(head) + + +def copyfiles(dir_origin,dir_cible,listfiles): + if not os.path.isdir(dir_cible):make_dir(dir_cible) + for glob_files in listfiles: + for file in glob.glob(os.path.join(dir_origin,glob_files)): + shutil.copy(file,dir_cible) + +def maketarball(dir_trav,dir_cible,nom_tar): + prev=os.getcwd() + print prev + os.chdir(dir_trav) + os.system("tar -cf "+nom_tar+".tar "+dir_cible) + os.system("gzip -f9 "+nom_tar+".tar ") + os.chdir(prev) + return os.path.join(dir_trav,nom_tar+".tar.gz") + +def makezipfile(dir_trav,dir_cible,nom_tar): + prev=os.getcwd() + os.chdir(dir_trav) + os.system("zip -rq "+nom_tar+".zip "+dir_cible) + os.chdir(prev) + return os.path.join(dir_trav,nom_tar+".zip") + +main() + diff --git a/Editeur/Interp.py b/Editeur/Interp.py index 5b320e19..752a44c7 100644 --- a/Editeur/Interp.py +++ b/Editeur/Interp.py @@ -1,9 +1,21 @@ -#@ MODIF Interp Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== import Tkinter,ScrolledText diff --git a/Editeur/Objecttreeitem.py b/Editeur/Objecttreeitem.py index 7e9ff7db..3a4d23b3 100644 --- a/Editeur/Objecttreeitem.py +++ b/Editeur/Objecttreeitem.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ # import généraux @@ -393,6 +412,12 @@ class SequenceTreeItem(ObjectTreeItem): def GetText(self): return " " + def additem(self,obj,pos): + # XXX Passer par addentite de MCList ??? + self.object.insert(pos,obj) + item = self.make_objecttreeitem(self.appli, obj.nom + ":", obj) + return item + def suppitem(self,item): if not self.object.isMCList():return 1 try : diff --git a/Editeur/__init__.py b/Editeur/__init__.py index e69de29b..427090e6 100644 --- a/Editeur/__init__.py +++ b/Editeur/__init__.py @@ -0,0 +1,19 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== diff --git a/Editeur/analyse_catalogue.py b/Editeur/analyse_catalogue.py index b52a564f..c06aafb3 100644 --- a/Editeur/analyse_catalogue.py +++ b/Editeur/analyse_catalogue.py @@ -1,9 +1,21 @@ -#@ MODIF analyse_catalogue Accas DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== from string import split,strip,lowercase,uppercase import re,string,cPickle,os @@ -11,8 +23,8 @@ import re,string,cPickle,os from Noyau.N_CR import CR # -__Id__="$Id: analyse_catalogue.py,v 1.13.18.3 2001/06/19 12:24:48 iliade Exp $" -__version__="$Name: FR_28_06_10_00 $" +__Id__="$Id: analyse_catalogue.py,v 1.1.1.1 2002/03/26 09:08:45 eficas Exp $" +__version__="$Name: $" # l_noms_commandes = ['OPER','PROC','MACRO','FORM'] l_noms_composes=['FACT','BLOC','NUPL','FORM'] diff --git a/Editeur/appli.py b/Editeur/appli.py index f8b031f7..c00568ce 100644 --- a/Editeur/appli.py +++ b/Editeur/appli.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la classe APPLI qui est la classe mère de l'application EFICAS. Elle prend en charge l'organisation générale @@ -110,6 +129,7 @@ class APPLI: root.option_add('*background', 'grey') root.option_add('*foreground', 'black') root.option_add('*EntryField.Entry.background', 'white') + root.option_add('*Entry*background', 'white') root.option_add('*Listbox*background', 'white') root.option_add('*Listbox*selectBackground', '#00008b') root.option_add('*Listbox*selectForeground', 'white') diff --git a/Editeur/browser.py b/Editeur/browser.py index 0553c6e3..ba5b9eee 100644 --- a/Editeur/browser.py +++ b/Editeur/browser.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ # Modules Python diff --git a/Editeur/bureau.py b/Editeur/bureau.py index 41840842..92da9ad6 100644 --- a/Editeur/bureau.py +++ b/Editeur/bureau.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la classe BUREAU qui gere les JDC ouverts """ @@ -10,6 +29,7 @@ from tkMessageBox import showinfo,askyesno,showerror # Modules Eficas import splash +import prefs import convert import generator from jdcdisplay import JDCDISPLAY @@ -58,6 +78,14 @@ class BUREAU: ('Delete24',"delete","Supprime l'objet courant",'jdc'), ('Help24',"view_doc","Documentation de l'objet courant",'jdc') ) + try: + menu_defs=prefs.menu_defs['bureau'] + except: + pass + try: + button_defs=prefs.button_defs['bureau'] + except: + pass def __init__(self,appli,parent): self.parent=parent @@ -108,6 +136,7 @@ class BUREAU: cata_ord_dico=self.cata_ordonne_dico, appli=self.appli) self.JDCName=J.nom + self.fileName=None self.ShowJDC(J,self.JDCName) self.appli.toolbar.active_boutons() @@ -196,7 +225,7 @@ class BUREAU: Demande à l'utilisateur quel JDC existant il veut ouvrir """ if self.code == 'ASTER': - filetypes = ( ("format "+self.appli.format_fichier.get(), ".comm"),) + filetypes = ( ("format "+self.appli.format_fichier.get(), ".comm"),("Tous",'*')) else: filetypes = ( ("format "+self.appli.format_fichier.get(), ".py"),) if not hasattr(self,'initialdir'): @@ -504,12 +533,16 @@ class BUREAU: """ if not hasattr(self,'JDC') : return titre = "fichier de commandes utilisateur" - texte = self.JDC.procedure - if texte == None: + #texte = self.JDC.procedure + #if texte == None: + if self.JDCDisplay_courant.fichier == None: self.appli.affiche_infos("Pas de fichier initial") - showerror("Impossible de visualiser le fichier initial","EFICAS ne peut visualiser le fichier \ - initial.\nIl s'agit d'un nouveau JDC") + showerror("Impossible de visualiser le fichier initial", + "EFICAS ne peut visualiser le fichier initial.\nIl s'agit d'un nouveau JDC") return + f=open(self.JDCDisplay_courant.fichier,'r') + texte=f.read() + f.close() self.visu_texte_JDC = Fenetre(self.appli,titre=titre,texte=texte) def affichage_fichier_ini(self): @@ -537,4 +570,6 @@ class BUREAU: l_mc = self.JDCDisplay_courant.jdc.get_liste_mc_inconnus() o = fenetre_mc_inconnus(l_mc) l = o.wait_new_list() + print "mc_inconnus_new_list: ",l + #CCAR: Il n' y a pas de retour vers le JDC diff --git a/Editeur/catabrowser.py b/Editeur/catabrowser.py index 24535cbc..3ecc286f 100644 --- a/Editeur/catabrowser.py +++ b/Editeur/catabrowser.py @@ -1,9 +1,21 @@ -#@ MODIF catabrowser Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== # Modules Python import os @@ -23,8 +35,8 @@ from Accas import OPER,PROC,MACRO,FORM from Accas import FACT,BLOC,SIMP # -__version__="$Name: V1_1p1 $" -__Id__="$Id: catabrowser.py,v 1.1.1.1 2001/12/04 15:38:22 eficas Exp $" +__version__="$Name: $" +__Id__="$Id: catabrowser.py,v 1.1.1.1 2002/03/26 09:08:46 eficas Exp $" # class Tableau: incr = 10 diff --git a/Editeur/cataediteur.py b/Editeur/cataediteur.py index 5cdbe211..728be924 100644 --- a/Editeur/cataediteur.py +++ b/Editeur/cataediteur.py @@ -1,9 +1,21 @@ -#@ MODIF cataediteur Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== # Modules Python import os @@ -26,8 +38,8 @@ from Accas import ASSD,GEOM import definition_cata # -__version__="$Name: V1_1p1 $" -__Id__="$Id: cataediteur.py,v 1.1.1.1 2001/12/04 15:38:22 eficas Exp $" +__version__="$Name: $" +__Id__="$Id: cataediteur.py,v 1.1.1.1 2002/03/26 09:08:46 eficas Exp $" # Fonte_Niveau = fontes.canvas_gras_italique diff --git a/Editeur/centerwindow.py b/Editeur/centerwindow.py index 95d9d33b..6b80e0d3 100644 --- a/Editeur/centerwindow.py +++ b/Editeur/centerwindow.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la fonction utilitaire centerwindow qui sert à centrer une fenetre diff --git a/Editeur/compobloc.py b/Editeur/compobloc.py index 085c7d97..6f0682a0 100644 --- a/Editeur/compobloc.py +++ b/Editeur/compobloc.py @@ -1,9 +1,21 @@ -#@ MODIF compobloc Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== from Tkinter import * import Pmw diff --git a/Editeur/compocomm.py b/Editeur/compocomm.py index 194730ed..d31e71de 100644 --- a/Editeur/compocomm.py +++ b/Editeur/compocomm.py @@ -1,9 +1,21 @@ -#@ MODIF compocomm Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== from Tkinter import * import Pmw diff --git a/Editeur/compocommandecomm.py b/Editeur/compocommandecomm.py index 8b8c9237..cab37e89 100644 --- a/Editeur/compocommandecomm.py +++ b/Editeur/compocommandecomm.py @@ -1,9 +1,21 @@ -#@ MODIF compocommandecomm Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== from Tkinter import * import Pmw diff --git a/Editeur/compofact.py b/Editeur/compofact.py index 0b52bbb3..7e0a7927 100644 --- a/Editeur/compofact.py +++ b/Editeur/compofact.py @@ -1,9 +1,21 @@ -#@ MODIF compofact Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== import Pmw import Objecttreeitem diff --git a/Editeur/compoformule.py b/Editeur/compoformule.py index b2d640f9..345bacc7 100644 --- a/Editeur/compoformule.py +++ b/Editeur/compoformule.py @@ -1,9 +1,21 @@ -#@ MODIF compoformule Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== """ Ce module contient les classes permettant de définir les objets graphiques diff --git a/Editeur/compojdc.py b/Editeur/compojdc.py index 64461749..f331c612 100644 --- a/Editeur/compojdc.py +++ b/Editeur/compojdc.py @@ -1,17 +1,27 @@ -#@ MODIF compojdc Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== -#XXX est ce utile ?from Tkinter import * import Pmw import Objecttreeitem import panels from widgets import ListeChoix -# XXX temporairement supprimé :from Accas import commentaire class JDCPanel(panels.OngletPanel): def init(self): diff --git a/Editeur/compomacro.py b/Editeur/compomacro.py index ce439f5d..84f723e1 100644 --- a/Editeur/compomacro.py +++ b/Editeur/compomacro.py @@ -1,9 +1,21 @@ -#@ MODIF compomacro Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== # Modules Python import os,sys,string @@ -23,8 +35,8 @@ import convert from widgets import Fenetre # -__version__="$Name: V1_1p1 $" -__Id__="$Id: compomacro.py,v 1.1.1.1 2001/12/04 15:38:22 eficas Exp $" +__version__="$Name: $" +__Id__="$Id: compomacro.py,v 1.3 2002/04/05 06:32:38 eficas Exp $" # class MACROPanel(panels.OngletPanel): @@ -187,6 +199,11 @@ class MACROTreeItem(compooper.EtapeTreeItem): Ce nom dépend de la validité de l'objet """ if self.object.isactif(): + if self.object.state != 'unchanged': + # Si des modifications ont eu lieu on force le calcul des concepts de sortie + # et celui du contexte glissant + self.object.get_type_produit(force=1) + self.object.parent.reset_context() if self.object.isvalid(): return "ast-green-square" else: @@ -230,6 +247,7 @@ class MACROTreeItem(compooper.EtapeTreeItem): # item.object = MCSIMP, MCFACT, MCBLOC ou MCList if item.object.isoblig() : self.appli.affiche_infos('Impossible de supprimer un mot-clé obligatoire ') + print "Impossible de supprimer un mot-clé obligatoire" return 0 else : self.object.suppentite(item.object) @@ -274,10 +292,6 @@ class MACROTreeItem(compooper.EtapeTreeItem): def verif_condition_bloc(self): return self.object.verif_condition_bloc() - def nomme_sd(self,nom): - """ Lance la méthode de nommage de la SD """ - return self.object.nomme_sd(nom) - def get_noms_sd_oper_reentrant(self): return self.object.get_noms_sd_oper_reentrant() diff --git a/Editeur/compomclist.py b/Editeur/compomclist.py index 74f5254e..e1ba88e4 100644 --- a/Editeur/compomclist.py +++ b/Editeur/compomclist.py @@ -1,9 +1,21 @@ -#@ MODIF compomclist Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== from Tkinter import * import Pmw @@ -39,7 +51,35 @@ class MCListTreeItem(Objecttreeitem.SequenceTreeItem): Retourne 1 si l'objet pointé par self est un MCFact, 0 sinon """ return 0 - + + def isMCList(self): + """ + Retourne 1 si l'objet pointé par self est une MCList, 0 sinon + """ + return 1 + + def additem(self,obj,pos): + """ + Ajoute un objet MCFACT à la MCList (self.object) à la position pos + """ + self.object.init_modif() + obj.verif_existence_sd() + obj.reparent(self.object.parent) + self.object.insert(pos,obj) + item = self.make_objecttreeitem(self.appli, obj.nom + ":", obj) + return item + + def suppitem(self,item): + """ + Retire un objet MCFACT de la MCList (self.object) + """ + self.object.init_modif() + self.object.remove(item.object) + # la liste peut être retournée vide ! + message = "Mot-clé " + item.object.nom + " supprimé" + self.appli.affiche_infos(message) + return 1 + import Accas treeitem = MCListTreeItem objet = Accas.MCList diff --git a/Editeur/componiveau.py b/Editeur/componiveau.py index 67ed0df1..f16c2c13 100644 --- a/Editeur/componiveau.py +++ b/Editeur/componiveau.py @@ -1,9 +1,21 @@ -#@ MODIF componiveau Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== from Tkinter import * diff --git a/Editeur/componuplet.py b/Editeur/componuplet.py index d4e76fb9..04d11082 100644 --- a/Editeur/componuplet.py +++ b/Editeur/componuplet.py @@ -1,9 +1,21 @@ -#@ MODIF componuplet Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== # Modules Python import types @@ -17,8 +29,8 @@ import Objecttreeitem import panels # -__version__="$Name: V1_1p1 $" -__Id__="$Id: componuplet.py,v 1.1.1.1 2001/12/04 15:38:22 eficas Exp $" +__version__="$Name: $" +__Id__="$Id: componuplet.py,v 1.1.1.1 2002/03/26 09:08:46 eficas Exp $" # myrepr = Repr() diff --git a/Editeur/compooper.py b/Editeur/compooper.py index eceb5cf8..154aa2ab 100644 --- a/Editeur/compooper.py +++ b/Editeur/compooper.py @@ -1,12 +1,25 @@ -#@ MODIF compooper Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== from Tkinter import * import Pmw +import traceback import Objecttreeitem import panels import fontes @@ -68,7 +81,8 @@ class OPERPanel(panels.OngletPanel): choix = self.listbox.getcurselection()[0] self.valeur_choisie.set(choix) except: - pass + traceback.print_exc() + def choose_valeur_from_list(self,command): try: @@ -76,7 +90,7 @@ class OPERPanel(panels.OngletPanel): self.valeur_choisie.set(choix) apply(command,(),{}) except: - pass + traceback.print_exc() class EtapeTreeItem(Objecttreeitem.ObjectTreeItem): panel = OPERPanel @@ -189,7 +203,9 @@ class EtapeTreeItem(Objecttreeitem.ObjectTreeItem): def nomme_sd(self,nom): """ Lance la méthode de nommage de la SD """ - return self.object.nomme_sd(nom) + test,mess= self.object.nomme_sd(nom) + if test:self.object.parent.reset_context() + return test,mess def is_reentrant(self): return self.object.is_reentrant() @@ -218,6 +234,16 @@ class EtapeTreeItem(Objecttreeitem.ObjectTreeItem): commande_comment.jdc = commande_comment.parent = self.object.jdc return commande_comment + def replace_child(self,old_item,new_item): + """ + Remplace old_item.object par new_item.object dans les fils de self.object + """ + index = self.object.mc_liste.index(old_item.object) + self.object.init_modif() + self.object.mc_liste.remove(old_item.object) + self.object.mc_liste.insert(index,new_item.object) + self.object.fin_modif() + import Accas treeitem = EtapeTreeItem objet = Accas.ETAPE diff --git a/Editeur/compoparam.py b/Editeur/compoparam.py index cd247e05..b5331466 100644 --- a/Editeur/compoparam.py +++ b/Editeur/compoparam.py @@ -1,9 +1,21 @@ -#@ MODIF compoparam Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== """ Ce module contient les classes permettant de définir les objets graphiques diff --git a/Editeur/compoparameval.py b/Editeur/compoparameval.py index 13bb98ba..2fa34a60 100644 --- a/Editeur/compoparameval.py +++ b/Editeur/compoparameval.py @@ -1,9 +1,21 @@ -#@ MODIF compoparameval Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== """ Ce module contient les classes permettant de définir les objets graphiques diff --git a/Editeur/compoproc.py b/Editeur/compoproc.py index 7cbc5edf..0fa5647d 100644 --- a/Editeur/compoproc.py +++ b/Editeur/compoproc.py @@ -1,9 +1,21 @@ -#@ MODIF compoproc Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== from Tkinter import * import Pmw @@ -130,10 +142,6 @@ class ProcEtapeTreeItem(compooper.EtapeTreeItem): def verif_condition_bloc(self): return self.object.verif_condition_bloc() - def nomme_sd(self,nom): - """ Lance la méthode de nommage de la SD """ - return self.object.nomme_sd(nom) - def get_noms_sd_oper_reentrant(self): return self.object.get_noms_sd_oper_reentrant() diff --git a/Editeur/composimp.py b/Editeur/composimp.py index d7ec659b..9168f2d9 100644 --- a/Editeur/composimp.py +++ b/Editeur/composimp.py @@ -1,17 +1,32 @@ -#@ MODIF composimp Editeur DATE 05/09/2001 AUTEUR DURAND C.DURAND # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== +# Modules Python import string,types,os from Tkinter import * import Pmw from tkFileDialog import * from tkMessageBox import showinfo from copy import copy,deepcopy +import traceback +# Modules Eficas import Objecttreeitem import prefs import panels @@ -51,7 +66,8 @@ class newSIMPPanel(panels.OngletPanel): def record_valeur(self,name=None,mess='Valeur du mot-clé enregistrée'): """ - Enregistre val comme valeur de self.node.item.object SANS faire de test de validité + Enregistre val comme valeur de self.node.item.object SANS + faire de test de validité """ if self.parent.modified == 'n' : self.parent.init_modif() if name != None: @@ -67,9 +83,9 @@ class newSIMPPanel(panels.OngletPanel): self.node.racine.verif_all() else : self.node.parent.verif() + self.node.update() if self.node.item.isvalid(): self.node.parent.select() - self.node.update() # ---------------------------------------------------------------------------------------- # Méthodes utlisées pour la manipulation des items dans les listes de choix # ---------------------------------------------------------------------------------------- @@ -196,18 +212,18 @@ class PLUSIEURS_Panel(newSIMPPanel): self.record_valeur(valeur) if self.node.item.isvalid(): self.node.parent.select() - # fermeture de la fenêtre de sélection - if self.ajout_valeurs: - self.ajout_valeurs.quit() + # fermeture de la fenêtre de sélection + if self.ajout_valeurs: + self.ajout_valeurs.quit() def annule_modifs_valeur(self): """ RAZ de la liste des valeurs (annule toutes les valeurs saisies par l'utilisateur) """ self.node.select() - # fermeture de la fenêtre de sélection - if self.ajout_valeurs: - self.ajout_valeurs.quit() + # fermeture de la fenêtre de sélection + if self.ajout_valeurs: + self.ajout_valeurs.quit() def traite_reel(self,valeur): """ @@ -305,7 +321,7 @@ class PLUSIEURS_INTO_Panel(PLUSIEURS_Panel): """ Génère la page de saisie de plusieurs valeurs parmi un ensemble discret de possibles - """ + """ self.ajout_valeurs = None # On récupère la bulle d'aide du panneau, l'objet, min et max (cardinalité de la liste), # la liste des choix et la liste des valeurs @@ -424,12 +440,12 @@ class PLUSIEURS_BASE_Panel(PLUSIEURS_Panel): # Création de l'entry ou de la liste des SD self.label = Label(self.frame_choix,text="Valeur :") self.make_entry(frame = self.frame_choix,command = self.add_valeur_sans_into) - self.label.place(relx=0.05,rely=0.5) - # Création d'un bouton "Importer ..." sur le panel. - bouton_valeurs_fichier = Button(self.frame_choix, - text="Importer ...", - command=self.select_in_file) - bouton_valeurs_fichier.place(relx=0.28,rely=0.7,relwidth=0.6) + self.label.place(relx=0.05,rely=0.5) + # Création d'un bouton "Importer ..." sur le panel. + bouton_valeurs_fichier = Button(self.frame_choix, + text="Importer ...", + command=self.select_in_file) + bouton_valeurs_fichier.place(relx=0.28,rely=0.7,relwidth=0.6) self.ajout_valeurs = None # boutons Ajouter et Supprimer bouton_add = Button(self.frame_boutons_fleches, @@ -441,10 +457,12 @@ class PLUSIEURS_BASE_Panel(PLUSIEURS_Panel): bouton_add.place(relx=0.3,rely=0.35) bouton_sup.place(relx=0.3,rely=0.65) # affichage de l'aide + self.frame_aide.update() self.aide = Label(self.frame_aide, text = aide, justify='center', - anchor='center') + anchor='center', + wraplength=int(self.frame_aide.winfo_width()*0.8)) self.aide.place(relx=0.5,rely=0.5,anchor='center',relwidth=1) self.Liste_valeurs.affiche_liste() # boutons Accepter et Annuler @@ -456,21 +474,24 @@ class PLUSIEURS_BASE_Panel(PLUSIEURS_Panel): command = self.annule_modifs_valeur) for but in (bouton_accepter,bouton_annuler): but.pack(side='left',padx=5) - - def select_in_file(self): - """ Permet d'ouvrir un fichier choisi par l'utilisateur. """ - nom_fichier = askopenfilename(title="Choix fichier :") - if nom_fichier == "": - return - try: - f = open(nom_fichier, "rb") - selection_texte = f.read() - f.close() - self.ajout_valeurs = FenetreDeSelection(self, self.node.item, - titre="Sélection de valeurs", - texte=selection_texte) - except: - showinfo("Erreur de fichier","impossible d'ouvir le fichier "+nom_fichier) + + def select_in_file(self): + """ Permet d'ouvrir un fichier choisi par l'utilisateur. """ + nom_fichier = askopenfilename(title="Choix fichier :") + if nom_fichier == "": + return + try: + f = open(nom_fichier, "rb") + selection_texte = f.read() + f.close() + self.ajout_valeurs = FenetreDeSelection(self, + self.node.item, + self.parent.appli, + titre="Sélection de valeurs", + texte=selection_texte) + except: + traceback.print_exc() + showinfo("Erreur de fichier","impossible d'ouvir le fichier "+nom_fichier) def get_bulle_aide(self): """ @@ -700,22 +721,20 @@ class UNIQUE_Panel(newSIMPPanel): if not test : mess = "impossible d'évaluer : %s " %`valeur` self.parent.appli.affiche_infos("Valeur du mot-clé non autorisée :"+mess) - return elif self.node.item.isvalid() : self.parent.appli.affiche_infos('Valeur du mot-clé enregistrée') + if self.node.item.get_position()=='global': + self.node.etape.verif_all() + elif self.node.item.get_position()=='global_jdc': + self.node.racine.verif_all() + else : + self.node.parent.verif() + self.node.update() self.node.parent.select() else : cr = self.node.item.get_cr() mess = "Valeur du mot-clé non autorisée :"+cr.get_mess_fatal() self.record_valeur(anc_val,mess=mess) - return - if self.node.item.get_position()=='global': - self.node.etape.verif_all() - elif self.node.item.get_position()=='global_jdc': - self.node.racine.verif_all() - else : - self.node.parent.verif() - self.node.update() class UNIQUE_INTO_Panel(UNIQUE_Panel): """ @@ -878,7 +897,7 @@ class UNIQUE_SDCO_Panel(UNIQUE_ASSD_Panel): self.listbox.place(relx=0.5,rely=0.3,relheight=0.4,anchor='center') # affichage du bouton 'Nouveau concept' self.b_co = Pmw.OptionMenu(self.frame_valeur,labelpos='w',label_text = "Nouveau concept : ", - items = ('OUI','NON'),menubutton_width=10) + items = ('NON','OUI'),menubutton_width=10) self.b_co.configure(command = lambda e,s=self : s.ask_new_concept()) self.b_co.place(relx=0.05,rely=0.6,anchor='w') self.label_co = Label(self.frame_valeur,text='Nom du nouveau concept :') @@ -888,9 +907,12 @@ class UNIQUE_SDCO_Panel(UNIQUE_ASSD_Panel): self.l_resu = Label(self.frame_valeur,text='Structure de donnée choisie :') self.valeur_choisie = StringVar() self.label_valeur = Label(self.frame_valeur,textvariable=self.valeur_choisie) - self.aide = Label(self.frame_valeur, text = aide) + self.frame_valeur.update() + self.aide = Label(self.frame_valeur, + text = aide, + wraplength=int(self.frame_valeur.winfo_width()*0.8), + justify='center') self.aide.place(relx=0.5,rely=0.85,anchor='n') - self.b_co.invoke('NON') # affichage de la valeur courante self.display_valeur() @@ -902,13 +924,66 @@ class UNIQUE_SDCO_Panel(UNIQUE_ASSD_Panel): pour valoriser le mot-clé simple courant ou cliquez sur NOUVEAU CONCEPT pour entrer le nom d'un concept non encore existant""" + def valid_valeur(self): + """ + Teste si la valeur fournie par l'utilisateur est une valeur permise : + - si oui, l'enregistre + - si non, restaure l'ancienne valeur + """ + if self.parent.modified == 'n' : self.parent.init_modif() + valeur = self.get_valeur() + self.erase_valeur() + anc_val = self.node.item.get_valeur() + test_CO=self.node.item.is_CO(anc_val) + test = self.node.item.set_valeur(valeur) + if not test : + mess = "impossible d'évaluer : %s " %`valeur` + self.parent.appli.affiche_infos("Valeur du mot-clé non autorisée :"+mess) + return + elif self.node.item.isvalid() : + self.parent.appli.affiche_infos('Valeur du mot-clé enregistrée') + if test_CO: + # il faut egalement propager la destruction de l'ancien concept + self.node.item.delete_valeur_co(valeur=anc_val) + # et on force le recalcul des concepts de sortie de l'etape + self.node.item.object.etape.get_type_produit(force=1) + # et le recalcul du contexte + self.node.item.object.etape.parent.reset_context() + self.node.parent.select() + else : + cr = self.node.item.get_cr() + mess = "Valeur du mot-clé non autorisée :"+cr.get_mess_fatal() + self.record_valeur(anc_val,mess=mess) + return + if self.node.item.get_position()=='global': + self.node.etape.verif_all() + elif self.node.item.get_position()=='global_jdc': + self.node.racine.verif_all() + else : + self.node.parent.verif() + self.node.update() + def valid_nom_concept_co(self,event=None): """ Lit le nom donné par l'utilisateur au concept de type CO qui doit être la valeur du MCS courant et stocke cette valeur """ + if self.parent.modified == 'n' : self.parent.init_modif() + anc_val = self.node.item.get_valeur() nom_concept = self.entry_co.get() - self.node.item.set_valeur_co(nom_concept) + test,mess=self.node.item.set_valeur_co(nom_concept) + if not test: + # On n'a pas pu créer le concept + self.parent.appli.affiche_infos(mess) + return + elif self.node.item.isvalid() : + self.parent.appli.affiche_infos('Valeur du mot-clé enregistrée') + self.node.parent.select() + else : + cr = self.node.item.get_cr() + mess = "Valeur du mot-clé non autorisée :"+cr.get_mess_fatal() + self.record_valeur(anc_val,mess=mess) + return if self.node.item.get_position()=='global': self.node.etape.verif_all() elif self.node.item.get_position()=='global_jdc': @@ -932,6 +1007,9 @@ class UNIQUE_SDCO_Panel(UNIQUE_ASSD_Panel): self.label_valeur.place_forget() self.entry_co.focus() elif new_concept == 'NON': + # On est passe de OUI à NON, on supprime la valeur + self.node.item.delete_valeur_co() + self.record_valeur(name=None,mess="Suppression CO enregistrée") self.label_co.place_forget() self.entry_co.place_forget() self.l_resu.place(relx=0.05,rely=0.7) @@ -942,14 +1020,40 @@ class UNIQUE_SDCO_Panel(UNIQUE_ASSD_Panel): Affiche la valeur de l'objet pointé par self """ valeur = self.node.item.get_valeur() - if valeur == None : return # pas de valeur à afficher ... + if valeur == None or valeur == '': + self.valeur_choisie.set('') + return # pas de valeur à afficher ... # il faut configurer le bouton si la valeur est un objet CO # sinon afficher le nom du concept dans self.valeur_choisie - if valeur.__class__.__name__ != 'CO': - self.valeur_choisie.set(valeur.nom) - else: + if self.node.item.is_CO(): self.b_co.invoke('OUI') self.entry_co.insert(0,valeur.nom) + else: + self.valeur_choisie.set(valeur.nom) + + def record_valeur(self,name=None,mess='Valeur du mot-clé enregistrée'): + """ + Enregistre val comme valeur de self.node.item.object SANS faire de test de validité + """ + if self.parent.modified == 'n' : self.parent.init_modif() + if name != None: + valeur =name + else : + self.entry_co.delete(0,END) + valeur= self.entry_co.get() + self.node.item.set_valeur_co(valeur) + self.parent.appli.affiche_infos(mess) + # On met a jour le display dans le panneau + self.display_valeur() + if self.node.item.get_position()=='global': + self.node.etape.verif_all() + elif self.node.item.get_position()=='global_jdc': + self.node.racine.verif_all() + else : + self.node.parent.verif() + if self.node.item.isvalid(): + self.node.parent.select() + self.node.update() class UNIQUE_BASE_Panel(UNIQUE_Panel): @@ -980,7 +1084,11 @@ class UNIQUE_BASE_Panel(UNIQUE_Panel): self.entry.bind("",lambda e,c=self.valid_valeur:c()) self.entry.focus() # aide associée au panneau - self.aide = Label(self.frame_valeur, text = aide) + self.frame_valeur.update() + self.aide = Label(self.frame_valeur, + text = aide, + wraplength=int(self.frame_valeur.winfo_width()*0.8), + justify='center') self.aide.place(relx=0.5,rely=0.7,anchor='n') # affichage de la valeur du MCS self.display_valeur() @@ -1047,7 +1155,11 @@ class UNIQUE_COMP_Panel(UNIQUE_Panel): self.entry1.place(relx=0.27,rely = 0.5,relwidth=0.35) self.entry2.place(relx=0.65,rely = 0.5,relwidth=0.35) self.entry1.focus() - self.aide = Label(self.frame_valeur, text = aide) + self.frame_valeur.update() + self.aide = Label(self.frame_valeur, + text = aide, + wraplength=int(self.frame_valeur.winfo_width()*0.8), + justify='center') self.aide.place(relx=0.5,rely=0.7,anchor='n') def get_bulle_aide(self): @@ -1135,7 +1247,6 @@ class SIMPTreeItem(Objecttreeitem.AtomicObjectTreeItem): else: # on attend un entier, un réel ou une string self.panel = UNIQUE_BASE_Panel - def SetText(self, text): try: @@ -1218,42 +1329,47 @@ class SIMPTreeItem(Objecttreeitem.AtomicObjectTreeItem): def GetMinMax(self): """ Retourne les valeurs min et max de la définition de object """ return self.object.get_min_max() - - def GetMultiplicite(self): - """ A préciser. - Retourne la multiplicité des valeurs affectées à l'objet - représenté par l'item. Pour le moment retourne invariablement 1. - """ - return 1 - - def GetType(self): - """ Retourne le type de valeur attendu par l'objet représenté par l'item. - """ - return self.object.get_type() - - def GetIntervalle(self): - """ Retourne le domaine de valeur attendu par l'objet représenté par l'item. - """ - return self.object.getintervalle() - - def IsInIntervalle(self,valeur): - """ Retourne 1 si la valeur est dans l'intervalle permis par - l'objet représenté par l'item. - """ - return self.object.isinintervalle(valeur) + + def GetMultiplicite(self): + """ A préciser. + Retourne la multiplicité des valeurs affectées à l'objet + représenté par l'item. Pour le moment retourne invariablement 1. + """ + return 1 + + def GetType(self): + """ + Retourne le type de valeur attendu par l'objet représenté par l'item. + """ + return self.object.get_type() + + def GetIntervalle(self): + """ + Retourne le domaine de valeur attendu par l'objet représenté + par l'item. + """ + return self.object.getintervalle() + + def IsInIntervalle(self,valeur): + """ + Retourne 1 si la valeur est dans l'intervalle permis par + l'objet représenté par l'item. + """ + return self.object.isinintervalle(valeur) def set_valeur_co(self,nom_co): """ Affecte au MCS pointé par self l'objet de type CO et de nom nom_co """ - self.object.set_valeur_co(nom_co) + return self.object.set_valeur_co(nom_co) def get_sd_avant_du_bon_type(self): """ Retourne la liste des noms des SD présentes avant l'étape qui contient le MCS pointé par self et du type requis par ce MCS """ - return self.object.jdc.get_sd_avant_du_bon_type(self.object.etape,self.object.definition.type) + return self.object.etape.parent.get_sd_avant_du_bon_type(self.object.etape, + self.object.definition.type) def GetListeValeurs(self) : """ Retourne la liste des valeurs de object """ @@ -1272,6 +1388,34 @@ class SIMPTreeItem(Objecttreeitem.AtomicObjectTreeItem): - retourne 'valeur' (chaîne de caractères) sinon """ return self.object.eval_valeur(valeur) + def is_CO(self,valeur=None): + """ + Indique si valeur est un concept produit de la macro + Cette méthode n'a de sens que pour un MCSIMP d'une MACRO + Si valeur vaut None on teste la valeur du mot cle + """ + # Pour savoir si un concept est un nouveau concept de macro + # on regarde s'il est présent dans l'attribut sdprods de l'étape + # ou si son nom de classe est CO. + # Il faut faire les 2 tests car une macro non valide peut etre + # dans un etat pas tres catholique avec des CO pas encore types + # et donc pas dans sdprods (resultat d'une exception dans type_sdprod) + if not valeur:valeur=self.object.valeur + if valeur in self.object.etape.sdprods:return 1 + if type(valeur) is not types.ClassType:return 0 + if valeur.__class__.__name__ == 'CO':return 1 + return 0 + + def delete_valeur_co(self,valeur=None): + """ + Supprime la valeur du mot cle (de type CO) + il faut propager la destruction aux autres etapes + """ + if not valeur : valeur=self.object.valeur + # XXX faut il vraiment appeler del_sdprod ??? + #self.object.etape.parent.del_sdprod(valeur) + self.object.etape.parent.delete_concept(valeur) + import Accas treeitem = SIMPTreeItem objet = Accas.MCSIMP diff --git a/Editeur/configuration.py b/Editeur/configuration.py index 7a191d57..f63634c0 100644 --- a/Editeur/configuration.py +++ b/Editeur/configuration.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module sert pour charger les paramètres de configuration d'EFICAS """ diff --git a/Editeur/definition_cata.py b/Editeur/definition_cata.py index d4842980..eeed1410 100644 --- a/Editeur/definition_cata.py +++ b/Editeur/definition_cata.py @@ -1,9 +1,21 @@ -#@ MODIF definition_cata Accas DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== # Modules Python import types diff --git a/Editeur/eficas.py b/Editeur/eficas.py index c1d683c1..a4da8d29 100644 --- a/Editeur/eficas.py +++ b/Editeur/eficas.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la classe EFICAS qui est l'application proprement dite. Elle est dérivée de la classe APPLI @@ -17,7 +36,10 @@ from widgets import Fenetre class EFICAS(appli.APPLI): - extensions=['readercata','bureau','browser','options'] + try: + from prefs import extensions + except: + extensions=['readercata','bureau','browser','options'] def get_texte_infos(self): texte=appli.APPLI.get_texte_infos(self) diff --git a/Editeur/eficas_go.py b/Editeur/eficas_go.py index 71f4bd09..3f4df08b 100644 --- a/Editeur/eficas_go.py +++ b/Editeur/eficas_go.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module permet de lancer l'application EFICAS en affichant un ecran Splash pour faire patentier l'utilisateur diff --git a/Editeur/faq.py b/Editeur/faq.py index 8caa7ef9..d480fe22 100644 --- a/Editeur/faq.py +++ b/Editeur/faq.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module sert a afficher le texte du FAQ EFICAS et à attendre l'acquittement par l'utilisateur diff --git a/Editeur/fenetre_mc_inconnus.py b/Editeur/fenetre_mc_inconnus.py index 113ec4e4..8a36c726 100644 --- a/Editeur/fenetre_mc_inconnus.py +++ b/Editeur/fenetre_mc_inconnus.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ # Modules Python @@ -46,10 +65,6 @@ class fenetre_mc_inconnus : self.frame1.place(relx=0,rely=0,relheight=0.2,relwidth=1) self.frame2.place(relx=0,rely=0.2,relheight=0.6,relwidth=1) self.frame3.place(relx=0,rely=0.8,relheight=0.2,relwidth=1) - self.frame21 = Frame(self.frame2) - self.frame22 = Frame(self.frame2) - self.frame21.place(relx=0,rely=0,relwidth=0.6,relheight=1) - self.frame22.place(relx=0.6,rely=0,relwidth=0.4,relheight=1) def init_label(self): """ @@ -68,19 +83,24 @@ class fenetre_mc_inconnus : """ Affiche les mots-clés à modifier ou supprimer """ + i=0 + self.widgets=[] for mc in self.l_mc : # mc est une liste : # mc contient comme premiers arguments l'étape et éventuellement les blocs, mcfact ... # et contient comme 2 derniers éléments le nom du mot-clé et sa valeur path_mc = self.get_path(mc[0:-2]) nom_mc = mc[-2] - Label(self.frame21,text = path_mc).pack(side='left') - e = Entry(self.frame22) - e.pack(side='left') + lab=Label(self.frame2,text = path_mc) + lab.grid(row=i,column=1,sticky=W) + e = Entry(self.frame2) + e.grid(row=i,column=0,sticky=W) e.insert(END,nom_mc) e.bind("",lambda event,en=e,m=mc,s=self : s.select_mc(m,en)) e.bind("",lambda e,s=self : s.modifie_mc()) e.configure(relief='flat',state='disabled') + self.widgets.append((e,lab)) + i=i+1 def init_boutons(self): """ @@ -120,7 +140,6 @@ class fenetre_mc_inconnus : """ txt = '' for o in l_o : - print o txt = txt + o.nom+'/' # on enlève le dernier slash en trop txt = txt[0:-1] @@ -156,6 +175,9 @@ class fenetre_mc_inconnus : """ index = self.l_mc.index(self.mc_courant) self.new_l_mc[index] = None + e,lab=self.widgets[index] + e.grid_remove() + lab.grid_remove() self.desactive_boutons() self.desactive_entry() diff --git a/Editeur/fontes.py b/Editeur/fontes.py index 013f6d2e..997e77fe 100644 --- a/Editeur/fontes.py +++ b/Editeur/fontes.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== standard = ("Times",10) standard_italique = ("Times",10,'italic') standard_gras = ("Times",10,'bold') diff --git a/Editeur/images.py b/Editeur/images.py index 31f8e2e2..e586d5ba 100644 --- a/Editeur/images.py +++ b/Editeur/images.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module joue le role de cache pour les images stockées dans le repertoire ICONDIR diff --git a/Editeur/import_code.py b/Editeur/import_code.py index 1152f1b7..4d05e343 100644 --- a/Editeur/import_code.py +++ b/Editeur/import_code.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module réalise toutes les mises à jour du chemin pour les imports de modules Python diff --git a/Editeur/jdcdisplay.py b/Editeur/jdcdisplay.py index d85ab06a..7c706069 100644 --- a/Editeur/jdcdisplay.py +++ b/Editeur/jdcdisplay.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la classe JDCDISPLAY qui réalise l'affichage du jeu de commandes sous la forme d'un arbre et de panneaux qui portent @@ -25,6 +44,7 @@ class JDCDISPLAY: self.jdc=jdc self.nom_jdc=nom_jdc self.fichier=None + self.panel_courant=None if not appli: class Appli: @@ -78,13 +98,32 @@ class JDCDISPLAY: Lance la génération du panneau contextuel de l'objet sélectionné dans l'arbre """ + if self.panel_courant: + # On detruit le panneau + self.panel_courant.destroy() + o=self.panel_courant + self.panel_courant=None + # Mettre à 1 pour verifier les cycles entre objets + # pour les panneaux + withCyclops=0 + if withCyclops: + from Misc import Cyclops + z = Cyclops.CycleFinder() + z.register(o) + del o + z.find_cycles() + z.show_stats() + z.show_cycles() + + if node.item.isactif(): if hasattr(node.item,"panel"): - return node.item.panel(self,self.pane.pane('selected'),node) + self.panel_courant=node.item.panel(self,self.pane.pane('selected'),node) else: raise Exception("Le noeud sélectionné n'a pas de panel associé") else: - return panels.Panel_Inactif(self,self.pane.pane('selected'),node) + self.panel_courant = panels.Panel_Inactif(self,self.pane.pane('selected'),node) + return self.panel_courant def init_modif(self): """ @@ -148,7 +187,7 @@ class JDCDISPLAY: Ne permet que la copie d'objets de type Commande ou MCF """ objet_a_copier = self.appli.noeud_a_editer.item.get_copie_objet() - if objet_a_copier.__class__.__name__ in ('ETAPE','PROC_ETAPE','MACRO_ETAPE'): + if objet_a_copier.__class__.__name__ in ('ETAPE','PROC_ETAPE','MACRO_ETAPE','FORM_ETAPE'): self.doPaste_Commande(objet_a_copier) elif objet_a_copier.__class__.__name__ == "MCFACT": self.doPaste_MCF(objet_a_copier) @@ -159,14 +198,16 @@ class JDCDISPLAY: def doPaste_Commande(self,objet_a_copier): """ - Réalise la copie de l'objet passé en argument qui est nécessairement une commande + Réalise la copie de l'objet passé en argument qui est nécessairement + une commande """ # il faut vérifier que le noeud sélectionné (noeud courant) est bien # une commande ou un JDC sinon la copie est impossible ... if self.node_selected.item.isCommande() : child = self.node_selected.append_brother(objet_a_copier,retour='oui') elif self.node_selected.item.isJdc() : - child = self.node_selected.append_child(objet_a_copier,retour='oui') + child = self.node_selected.append_child(objet_a_copier,pos='first', + retour='oui') else: showinfo("Copie impossible", "Vous ne pouvez coller la commande copiée à ce niveau de l'arborescence !") @@ -195,10 +236,17 @@ class JDCDISPLAY: child = self.node_selected.append_child(objet_a_copier,retour='oui') elif self.node_selected.item.isMCList() : # le noeud courant est une MCList - child = self.node_selected.parent.append_child(objet_a_copier,retour='oui') + child = self.node_selected.parent.append_child(objet_a_copier,pos='first',retour='oui') elif self.node_selected.item.isMCFact(): # le noeud courant est un MCFACT - child = self.node_selected.parent.append_child(objet_a_copier,retour='oui') + if self.node_selected.parent.item.isMCList(): + # le noeud selectionne est un MCFACT dans une MCList + child = self.node_selected.parent.append_child(objet_a_copier, + pos=self.node_selected.item, + retour='oui') + else: + # le noeud MCFACT selectionne n'est pas dans une MCList + child = self.node_selected.parent.append_child(objet_a_copier,retour='oui') else: showinfo("Copie impossible", "Vous ne pouvez coller le mot-clé facteur copié à ce niveau de l'arborescence !") diff --git a/Editeur/menubar.py b/Editeur/menubar.py index ad2366e8..89c74406 100644 --- a/Editeur/menubar.py +++ b/Editeur/menubar.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ from Tkinter import Menu @@ -12,7 +31,10 @@ class MENUBAR: self.parent.configure(menu=self.menubar) self.init() - labels= ('Fichier','Edition','Jeu de commandes','Catalogue','Browsers','Options') + try: + from prefs import labels + except: + labels= ('Fichier','Edition','Jeu de commandes','Catalogue','Browsers','Options') def init(self): self.menudict={} @@ -21,11 +43,3 @@ class MENUBAR: self.menudict[label]=menu self.menubar.add_cascade(label=label,menu=menu) - #self.optionmenu.add_command(label='Catalogue développeur',command=self.choix_cata_developpeur) - - #self.browsermenu.add_command(label='Browser catalogue',command = self.browser_catalogue) - #self.browsermenu.add_command(label='Shell',command = self.shell) - #self.browsermenu.add_command(label='Editeur catalogue',command = self.edite_catalogue) - - - diff --git a/Editeur/options.py b/Editeur/options.py index 0101dd05..d08c6c2e 100644 --- a/Editeur/options.py +++ b/Editeur/options.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ # Modules Python diff --git a/Editeur/panels.py b/Editeur/panels.py index 8338308a..5999c6c9 100644 --- a/Editeur/panels.py +++ b/Editeur/panels.py @@ -1,9 +1,21 @@ -#@ MODIF panels Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== import string import os @@ -29,6 +41,32 @@ class Panel(Frame) : self.creer_boutons() self.init() + def destroy(self): + Frame.destroy(self) + self.panneau=None + self.parent=None + # Because on herite de Frame + self.master=None + # On supprime explicitement les references aux objets Tk + self.nb=None + self.fr_but=None + self.bouton_cata=None + self.bouton_doc=None + self.bouton_com=None + self.bouton_sup=None + self.frame_eval=None + self.label=None + self.frame_boutons=None + self.frame_comment=None + self.frame_param=None + # On termine la suppression de facon brutale (objets Tk et non Tk) + for k in self.__dict__.keys(): + # il est plus prudent de ne pas détruire le lien sur le Node + # si on voulait mettre l'attribut node à None, il faudrait + # que tous les appels à node.parent.select() apparaissent après + # toutes les autres actions liées au panel (node.item.isglobal(), ...) + if k != 'node' : setattr(self,k,None) + def creer_boutons(self): """ Méthode créant les boutons se trouvant dans la partie contextuelle d'EFICAS @@ -152,7 +190,6 @@ class Panel(Frame) : if self.parent.modified == 'n' : self.parent.init_modif() pere = self.node.parent self.node.delete() - pere.select() def affiche(self): """ Force l'affichage des fenêtres en cours """ diff --git a/Editeur/readercata.py b/Editeur/readercata.py index 47667a09..0472c3f7 100644 --- a/Editeur/readercata.py +++ b/Editeur/readercata.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module sert à lire un catalogue et à construire un objet CataItem pour Eficas. diff --git a/Editeur/splash.py b/Editeur/splash.py index c3e5339d..3002d375 100644 --- a/Editeur/splash.py +++ b/Editeur/splash.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module permet de créer, mettre à jour et détruire un écran Splash diff --git a/Editeur/statusbar.py b/Editeur/statusbar.py index 6c0687a1..604025a8 100644 --- a/Editeur/statusbar.py +++ b/Editeur/statusbar.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ # Modules Python diff --git a/Editeur/toolbar.py b/Editeur/toolbar.py index e99a56de..bd93737a 100644 --- a/Editeur/toolbar.py +++ b/Editeur/toolbar.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ # Modules Python diff --git a/Editeur/tooltip.py b/Editeur/tooltip.py index d43992c9..18d03d58 100644 --- a/Editeur/tooltip.py +++ b/Editeur/tooltip.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module propose la classe TOOLTIP pour mettre en oeuvre les bulles d'aide diff --git a/Editeur/treeitemincanvas.py b/Editeur/treeitemincanvas.py index 5ec26438..2a1c45ac 100644 --- a/Editeur/treeitemincanvas.py +++ b/Editeur/treeitemincanvas.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ # Modules Python @@ -25,7 +44,7 @@ class TREEITEMINCANVAS: self.parent=parent self.item=Objecttreeitem.make_objecttreeitem(self.appli,self.nom,self.object) - self.canvas=Pmw.ScrolledCanvas(self.parent,borderframe=1) + self.canvas=Pmw.ScrolledCanvas(self.parent,borderframe=1,canvas_background='gray95') self.canvas.pack(padx=10,pady=10,fill = 'both', expand = 1) if not sel: def sel(event=None): diff --git a/Editeur/treewidget.py b/Editeur/treewidget.py index a0d6554e..d7f63044 100644 --- a/Editeur/treewidget.py +++ b/Editeur/treewidget.py @@ -1,11 +1,23 @@ -#@ MODIF treewidget Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== -import os,sys,string,re,types +import os,sys,string,re,types,traceback from Tkinter import * @@ -13,8 +25,8 @@ import fontes import images # -__version__="$Name: V1_1p1 $" -__Id__="$Id: treewidget.py,v 1.1.1.1 2001/12/04 15:38:23 eficas Exp $" +__version__="$Name: $" +__Id__="$Id: treewidget.py,v 1.4 2002/04/05 06:32:39 eficas Exp $" # Fonte_Standard = fontes.standard @@ -468,6 +480,7 @@ class Node : try: self.canvas.addtag_overlapping('move',bbox1[0],self.y +10,bbox1[2],bbox1[3]) except: + print "Erreur dans move :" print self print self.item print self.item.object @@ -493,6 +506,7 @@ class Node : try: child.trace_ligne() except: + print "Erreur dans trace_ligne :" print child print child.item.object @@ -521,21 +535,23 @@ class Node : def full_creation(self,name,pos=None): """ - Interface avec ACCAS : création de l'objet de nom name et - du noeud associé. Retourne le noeud fils ainsi créé + Interface avec ACCAS : création de l'objet de nom name et + du noeud associé. Retourne le noeud fils ainsi créé """ item = self.item.additem(name,pos) if item == None or item == 0: # impossible d'ajouter le noeud de nom : name return 0 nature = item.get_nature() - #if nature =="COMMANDE" or nature == "OPERATEUR" or nature == "PROCEDURE": if nature in ("COMMANDE","OPERATEUR","PROCEDURE","COMMENTAIRE", "PARAMETRE","COMMANDE_COMMENTARISEE","PARAMETRE_EVAL"): # on veut ajouter une commande ou un commentaire ou un paramètre # il ne faut pas rechercher un même objet déjà existant # à modifier : il faut tester l'attribut 'repetable' enfant = None + elif self.item.object.isMCList(): + # Dans ce cas on ne fait pas de remplacement. On ne cherche pas un objet de meme nom + enfant=None else : enfant = self.get_node_fils(item.get_nom()) if enfant : @@ -611,6 +627,9 @@ class Node : # on donne la position depuis l'extérieur # (appel de append_child par append_brother par exemple) index = pos + elif type(pos) == types.InstanceType: + # pos est un item. Il faut inserer name apres pos + index = self.item.get_index(pos) +1 else : if type(name) == types.InstanceType: index = self.item.get_index_child(name.nom) @@ -676,6 +695,7 @@ class Node : print 'Erreur dans la destruction de ',self.item.get_nom(),' dans delete' nbnew = pere.get_nb_children() pere.redraw(nbnew-nbold) + pere.select() def copynode(self,node,pos) : """ node est le noeud à copier à la position pos de self ( = parent de node) """ @@ -690,15 +710,16 @@ class Node : try : child.item.object.mc_liste = objet_copie.mc_liste except: - pass + traceback.print_exc() #-------------------------------------------------------------- # Méthodes de vérification du contexte et de validité du noeud #-------------------------------------------------------------- - def traite_mclist(self): + def traite_mclist_OLD(self): """ Dans le cas d'une MCList il faut vérifier qu'elle n'est pas vide ou réduite à un seul élément suite à une destruction """ # self représente une MCList + print "on passe par traite_mclist ",len(self.item) if len(self.item) == 0 : # la liste est vide : il faut la supprimer self.delete() @@ -709,6 +730,8 @@ class Node : noeud = self.children[0] if self.parent.delete_child(self): self.parent.append_node_child(noeud.item,pos=index,verif='non') + else: + print "destruction de self impossible !" #if self.parent.delete_child(self): # self.parent.copynode(self.children[0],index) #else : @@ -716,6 +739,26 @@ class Node : else : return + def traite_mclist(self): + """ Dans le cas d'une MCList il faut vérifier qu'elle n'est pas vide + ou réduite à un seul élément suite à une destruction + """ + # self représente une MCList + if len(self.item) == 0 : + # la liste est vide : il faut la supprimer + self.delete() + elif len(self.item) == 1: + # il ne reste plus qu'un élément dans la liste + # il faut supprimer la liste et créer directement l'objet + index = self.parent.children.index(self) + noeud = self.children[0] + noeud.parent = self.parent + self.parent.delete_node_child(self) + self.parent.item.replace_child(self.item,noeud.item) + self.parent.children.insert(index,noeud) + else : + return + def verif_all(self): self.verif_all_children() diff --git a/Editeur/utils.py b/Editeur/utils.py index 9f09ecd4..b3980a63 100644 --- a/Editeur/utils.py +++ b/Editeur/utils.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient des utilitaires divers """ diff --git a/Editeur/widgets.py b/Editeur/widgets.py index 5b5d4ea2..0c02a3c8 100644 --- a/Editeur/widgets.py +++ b/Editeur/widgets.py @@ -1,9 +1,21 @@ -#@ MODIF widgets Editeur DATE 05/09/2001 AUTEUR DURAND C.DURAND # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== # ---------------------------------------------------------- # Cette classe sert à définir les widgets utilisés par diff --git a/Exemples/ex11/main.py b/Exemples/ex11/main.py index 08352a34..942472b5 100644 --- a/Exemples/ex11/main.py +++ b/Exemples/ex11/main.py @@ -28,6 +28,16 @@ class concept: """ Retourne 1 si sd est du bon type par rapport à la classe """ return 0 +class cata: + def __init__(self): + CONTEXT.unset_current_cata() + CONTEXT.set_current_cata(self) + + def enregistre(self,commande): + return + +c=cata() + OP1 = OPER(nom='OP1',op=1,sd_prod=concept,reentrant='f', a=SIMP(typ='I'), c=SIMP(typ='I',position='global'), diff --git a/Extensions/__init__.py b/Extensions/__init__.py index e69de29b..427090e6 100644 --- a/Extensions/__init__.py +++ b/Extensions/__init__.py @@ -0,0 +1,19 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== diff --git a/Extensions/commande_comm.py b/Extensions/commande_comm.py index 68bd102d..28b91a3b 100644 --- a/Extensions/commande_comm.py +++ b/Extensions/commande_comm.py @@ -1,9 +1,21 @@ -#@ MODIF commande_comm Accas DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== import os,traceback,string @@ -30,6 +42,7 @@ class COMMANDE_COMM: self.definition=self self.nom = '' self.niveau = self.parent.niveau + self.actif=1 #self.appel = N_utils.callee_where(niveau=2) if reg=='oui' : self.register() @@ -216,3 +229,19 @@ class COMMANDE_COMM: """ return [] + def reparent(self,parent): + """ + Cette methode sert a reinitialiser la parente de l'objet + """ + self.parent=parent + self.jdc=parent.get_jdc_root() + self.etape=self + + def verif_existence_sd(self): + """ + Vérifie que les structures de données utilisées dans self existent bien dans le contexte + avant étape, sinon enlève la référence à ces concepts + --> sans objet pour les commandes commentarisées + """ + pass + diff --git a/Extensions/commentaire.py b/Extensions/commentaire.py index 733a2016..db79f3f7 100644 --- a/Extensions/commentaire.py +++ b/Extensions/commentaire.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la classe COMMENTAIRE qui sert dans EFICAS pour gérer les commentaires dans un JDC @@ -145,5 +164,12 @@ class COMMENTAIRE : """ return [] + def get_sdprods(self,nom_sd): + """ + Retourne les concepts produits par la commande + """ + return None + def verif_existence_sd(self): + pass diff --git a/Extensions/etape_niveau.py b/Extensions/etape_niveau.py index 31c7c20a..dbd72fea 100644 --- a/Extensions/etape_niveau.py +++ b/Extensions/etape_niveau.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la classe ETAPE_NIVEAU qui sert à concrétiser les niveaux au sein d'un JDC diff --git a/Extensions/interpreteur_formule.py b/Extensions/interpreteur_formule.py index 7e2dbdf9..4d1b93d4 100644 --- a/Extensions/interpreteur_formule.py +++ b/Extensions/interpreteur_formule.py @@ -1,9 +1,21 @@ -#@ MODIF interpreteur_formule Accas DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== import string,re,sys,exceptions,types @@ -145,6 +157,8 @@ class Interpreteur_Formule: texte = [texte,] for text_arg in texte: text_arg = string.replace(text_arg,'\n','') + # Enleve les espaces + text_arg = string.replace(text_arg,' ','') try: self.l_operateurs.append(self.split_operateurs(text_arg)) except InterpreteurException,e: diff --git a/Extensions/jdc.py b/Extensions/jdc.py index 8b7cdf29..313ec043 100644 --- a/Extensions/jdc.py +++ b/Extensions/jdc.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la classe mixin qui porte les méthodes pour traiter les niveaux au sein d'un JDC diff --git a/Extensions/mcnuplet.py b/Extensions/mcnuplet.py index da997b6d..6db18fda 100644 --- a/Extensions/mcnuplet.py +++ b/Extensions/mcnuplet.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ # Modules Python @@ -32,6 +51,7 @@ class MCNUPLET(V_MCCOMPO.MCCOMPO,N_MCCOMPO.MCCOMPO): self.niveau = None self.etape = None self.state = 'undetermined' + self.actif=1 self.mc_liste=self.build_mc() def build_mc(self): diff --git a/Extensions/niveau.py b/Extensions/niveau.py index b5df8fdf..8b6f0822 100644 --- a/Extensions/niveau.py +++ b/Extensions/niveau.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la classe NIVEAU qui sert à définir des groupes de commandes dans le catalogue diff --git a/Extensions/nuplet.py b/Extensions/nuplet.py index 63da3689..0ec02ba6 100644 --- a/Extensions/nuplet.py +++ b/Extensions/nuplet.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la classe de définition pour les nuplets NUPL """ diff --git a/Extensions/parametre.py b/Extensions/parametre.py index 94f028f0..20455bfe 100644 --- a/Extensions/parametre.py +++ b/Extensions/parametre.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la classe PARAMETRE qui sert à définir des objets paramètres qui sont compréhensibles et donc affichables @@ -33,6 +52,7 @@ class PARAMETRE : self.definition=self self.jdc = self.parent = CONTEXT.get_current_step() self.niveau=self.parent.niveau + self.actif=1 self.register() def interprete_valeur(self,val): @@ -249,7 +269,8 @@ class PARAMETRE : """ return [] - + def verif_existence_sd(self): + pass diff --git a/Extensions/parametre_eval.py b/Extensions/parametre_eval.py index 73bf9bd6..b45546d9 100644 --- a/Extensions/parametre_eval.py +++ b/Extensions/parametre_eval.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la classe PARAMETRE_EVAL qui sert à définir des objets paramètres qui sont compréhensibles et donc affichables @@ -36,6 +55,7 @@ class PARAMETRE_EVAL(parametre.PARAMETRE) : self.jdc = self.parent = CONTEXT.get_current_step() self.definition=self self.niveau = self.parent.niveau + self.actif=1 # Ceci est-il indispensable ??? #self.appel = N_utils.callee_where(niveau=2) self.register() @@ -60,6 +80,8 @@ class PARAMETRE_EVAL(parametre.PARAMETRE) : """ if not val : return None d={} + val = string.strip(val) + if val[-1] == ';' : val = val[0:-1] d['EVAL'] = Accas.EVAL try: valeur = eval(val,{},d) diff --git a/Extensions/pluginloader.py b/Extensions/pluginloader.py index 659027d2..378500c0 100644 --- a/Extensions/pluginloader.py +++ b/Extensions/pluginloader.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient le chargeur dynamique de plugins (emprunté à HappyDoc) """ diff --git a/Ihm/I_ASSD.py b/Ihm/I_ASSD.py new file mode 100644 index 00000000..004d0b86 --- /dev/null +++ b/Ihm/I_ASSD.py @@ -0,0 +1,23 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + +class ASSD: + def __repr__(self): + return "concept %s de type %s" % (self.get_name(),self.__class__.__name__) diff --git a/Ihm/I_A_CLASSER.py b/Ihm/I_A_CLASSER.py index 16853f5f..e1f19ca5 100644 --- a/Ihm/I_A_CLASSER.py +++ b/Ihm/I_A_CLASSER.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ diff --git a/Ihm/I_ENTITE.py b/Ihm/I_ENTITE.py index 3a070e1c..4a2ac465 100644 --- a/Ihm/I_ENTITE.py +++ b/Ihm/I_ENTITE.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== class ENTITE: def get_docu(self): if hasattr(self,'docu') : diff --git a/Ihm/I_ETAPE.py b/Ihm/I_ETAPE.py index 8937c110..dfebffa2 100644 --- a/Ihm/I_ETAPE.py +++ b/Ihm/I_ETAPE.py @@ -1,9 +1,35 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ # Modules Python import string,types from copy import copy +# import rajoutés suite à l'ajout de Build_sd --> à résorber +import traceback +import Noyau +from Noyau import N_Exception +from Noyau.N_Exception import AsException +# fin import à résorber + # Modules EFICAS import I_MCCOMPO @@ -63,7 +89,8 @@ class ETAPE(I_MCCOMPO.MCCOMPO): """ if self.isvalid() : if type(self.definition.op_init) == types.FunctionType : - apply(self.definition.op_init,(self,self.master.g_context)) + # XXX Normalement en mode editeur g_context ne peut pas etre utilisé + apply(self.definition.op_init,(self,self.parent.g_context)) self.state = 'modified' def nomme_sd(self,nom) : @@ -82,7 +109,9 @@ class ETAPE(I_MCCOMPO.MCCOMPO): # Cas particulier des opérateurs réentrants if not self.isvalid(sd='non') : return 0,"Nommage du concept refusé : l'opérateur n'est pas valide" if self.definition.reentrant == 'o': - self.sd = self.reuse = self.jdc.get_sdprod(nom) + # FR : appel à get_sdprod incorrect : il faut appeler get_sd_avant_etape + #self.sd = self.reuse = self.jdc.get_sdprod(nom) + self.sd = self.reuse = self.jdc.get_sd_avant_etape(nom,self) if self.sd != None : return 1,"Concept existant" else: @@ -90,8 +119,12 @@ class ETAPE(I_MCCOMPO.MCCOMPO): if self.definition.reentrant == 'f' : sd = self.jdc.get_sd_avant_etape(nom,self) if sd != None : - self.sd = self.reuse = sd - return 1,"Opérateur facultativement réentrant et concept existant trouvé" + # FR : il faut tester que la sd trouvée est du bon type !!!!!!!!!!!!!!!!! + if isinstance(sd,self.get_type_produit()) : + self.sd = self.reuse = sd + return 1,"Opérateur facultativement réentrant et concept existant trouvé" + else: + return 0,"Concept déjà existant et de mauvais type" else : # il faut éventuellement enlever le lien vers une SD existante car si on passe ici # cela signifie que l'opérateur n'est pas utilisé en mode réentrant. @@ -234,9 +267,11 @@ class ETAPE(I_MCCOMPO.MCCOMPO): etape.state = 'modified' etape.reuse = None etape.sdnom = None + etape.etape=etape etape.mc_liste=[] for objet in self.mc_liste: new_obj = objet.copy() + new_obj.reparent(etape) etape.mc_liste.append(new_obj) return etape @@ -270,3 +305,103 @@ class ETAPE(I_MCCOMPO.MCCOMPO): l.extend(child.get_sd_utilisees()) return l + def get_genealogie(self): + """ + Retourne la liste des noms des ascendants de l'objet self + en s'arretant à la première ETAPE rencontrée + """ + return [self.nom] + + def reparent(self,parent): + """ + Cette methode sert a reinitialiser la parente de l'objet + """ + self.parent=parent + self.jdc=parent.get_jdc_root() + self.etape=self + for mocle in self.mc_liste: + mocle.reparent(self) + + def verif_existence_sd(self): + """ + Vérifie que les structures de données utilisées dans self existent bien dans le contexte + avant étape, sinon enlève la référence à ces concepts + """ + for motcle in self.mc_liste : + motcle.verif_existence_sd() + + def Build_sd(self,nom): + """ + Construit le concept produit de l'opérateur. Deux cas + peuvent se présenter : + + - le parent n'est pas défini. Dans ce cas, l'étape prend en charge la création + et le nommage du concept. + + - le parent est défini. Dans ce cas, l'étape demande au parent la création et + le nommage du concept. + + """ + if not self.isactif():return + # FR : attention cette méthode ne devrait pas se trouver là car elle surcharge celle qui + # se trouve dans N_ETAPE.py et elle est partie intégrante du noyau, mais, suite à l'absence de + # test de validité de l'opérateur avant d'essayer de déterminer la sd produite, on n'arrivait + # pas à relire avec EFICAS un fichier contenant une étape encore incomplète du style : + # sansnom = AFFE_CHAR_CINE(MODELE=None) + # Suite à la stabilisation du noyau d'Aster, je n'ai pas eu d'autre solution que de surcharger + # cette méthode ici en rajoutant le test manquant ... + # CCAR : cette modification ne corrige le probleme qu'en partie. Il faudrait probablement + # supprimer les erreurs fatales (exception ) et retourner systematiquement un objet produit + # meme en cas d'erreur et reporter l'emission du message d'erreur a la phase de validation + if not self.isvalid(sd='non') : return + else:self.state='undetermined' + try: + if self.parent: + sd= self.parent.create_sdprod(self,nom) + if type(self.definition.op_init) == types.FunctionType: + apply(self.definition.op_init,(self,self.parent.g_context)) + else: + sd=self.get_sd_prod() + # On n'utilise pas self.definition.op_init car self.parent + # n'existe pas + if sd != None and self.reuse == None: + # On ne nomme le concept que dans le cas de non reutilisation + # d un concept + sd.nom=nom + if self.jdc and self.jdc.par_lot == "NON" : + self.Execute() + return sd + except AsException,e: + raise AsException("Etape ",self.nom,'ligne : ',self.appel[0], + 'fichier : ',self.appel[1],e) + except EOFError: + # XXX Normalement le contexte courant doit etre le parent. + # Il n'y a pas de raison de remettre le contexte au parent + #self.reset_current_step() + raise + except : + l=traceback.format_exception(sys.exc_info()[0],sys.exc_info()[1],sys.exc_info()[2]) + raise AsException("Etape ",self.nom,'ligne : ',self.appel[0], + 'fichier : ',self.appel[1]+'\n', + string.join(l)) + + + + + + + + + + + + + + + + + + + + + diff --git a/Ihm/I_EXCLUS.py b/Ihm/I_EXCLUS.py index e53ead8e..844d61f0 100644 --- a/Ihm/I_EXCLUS.py +++ b/Ihm/I_EXCLUS.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ @@ -13,7 +32,8 @@ class EXCLUS(I_REGLE.REGLE): if not regle_active : return liste_a_purger for mc in self.mcs: - if mc in liste_a_purger: + # Il ne faut pas purger un mot cle present. Sa cardinalite est verifiee par ailleurs + if mc in liste_a_purger and mc not in liste_mc_presents: liste_a_purger.remove(mc) return liste_a_purger diff --git a/Ihm/I_FONCTION.py b/Ihm/I_FONCTION.py new file mode 100644 index 00000000..b708dee6 --- /dev/null +++ b/Ihm/I_FONCTION.py @@ -0,0 +1,41 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== +from I_ASSD import ASSD + +class FONCTION(ASSD): + def __init__(self,etape=None,sd=None,reg='oui'): + #ASSD.__init__(self,etape=etape,sd=sd,reg=reg) + if reg=='oui': + self.jdc.register_fonction(self) + + def get_formule(self): + """ + Retourne une formule décrivant self sous la forme d'un tuple : + (nom,type_retourne,arguments,corps) + """ + if hasattr(self.etape,'get_formule'): + # on est dans le cas d'une formule Aster + return self.etape.get_formule() + else: + # on est dans le cas d'une fonction + return (self.nom,'REEL','(REEL:x)','''bidon''') + +class fonction(FONCTION) : pass + diff --git a/Ihm/I_FORM_ETAPE.py b/Ihm/I_FORM_ETAPE.py index 51100165..80689be4 100644 --- a/Ihm/I_FORM_ETAPE.py +++ b/Ihm/I_FORM_ETAPE.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ import string,traceback @@ -56,6 +75,15 @@ class FORM_ETAPE(MACRO_ETAPE): else: return '' + def get_formule(self): + """ + Retourne un tuple décrivant la formule : + (nom,type_retourne,arguments,corps) + """ + t,a,c = self.analyse_formule() + n = self.get_nom() + return (n,t,a,c) + def verif_arguments(self,arguments = None): """ Vérifie si les arguments passés en argument (si aucun prend les arguments courants) diff --git a/Ihm/I_JDC.py b/Ihm/I_JDC.py index 2c26ab8e..125fb617 100644 --- a/Ihm/I_JDC.py +++ b/Ihm/I_JDC.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ # Modules Python @@ -6,9 +25,8 @@ import string,linecache # Modules Eficas import I_OBJECT -from Noyau.N_ASSD import assd +from Noyau.N_ASSD import ASSD from Noyau.N_ETAPE import ETAPE -from Noyau.N_CO import CO from Noyau.N_Exception import AsException from Extensions import commentaire,parametre,parametre_eval @@ -21,6 +39,7 @@ class JDC(I_OBJECT.OBJECT): self.niveau=self self.params=[] self.fonctions=[] + self._etape_context=None def get_cmd(self,nomcmd): """ @@ -38,20 +57,32 @@ class JDC(I_OBJECT.OBJECT): l=[] for k,v in d.items(): if type(v) != types.InstanceType : continue - if assd in types_permis or CO in types_permis : - l.append(k) - continue - for type_ok in types_permis: - if type_ok in ('R','I','C','TXM') and v in self.params : l.append(k) - elif type_ok == 'R' and v.__class__.__name__ == 'reel' : l.append(k) - elif type_ok == 'I' and v.__class__.__name__ == 'entier' : l.append(k) - elif type_ok == 'C' and v.__class__.__name__ == 'complexe' : l.append(k) - elif type_ok == 'TXM' and v.__class__.__name__ == 'chaine' : l.append(k) - elif type(type_ok) != types.ClassType : continue - elif v.__class__ == type_ok or issubclass(v.__class__,type_ok): l.append(k) + # On considère que seul assd indique un type quelconque pas CO + elif self.assd in types_permis : + l.append(k) + elif self.est_permis(v,types_permis): + l.append(k) l.sort() return l + def est_permis(self,v,types_permis): + for type_ok in types_permis: + if type_ok in ('R','I','C','TXM') and v in self.params : + return 1 + elif type_ok == 'R' and v.__class__.__name__ == 'reel' : + return 1 + elif type_ok == 'I' and v.__class__.__name__ == 'entier' : + return 1 + elif type_ok == 'C' and v.__class__.__name__ == 'complexe' : + return 1 + elif type_ok == 'TXM' and v.__class__.__name__ == 'chaine' : + return 1 + elif type(type_ok) != types.ClassType : + continue + elif v.__class__ == type_ok or issubclass(v.__class__,type_ok): + return 1 + return 0 + def addentite(self,name,pos): """ Ajoute une entite : @@ -83,6 +114,7 @@ class JDC(I_OBJECT.OBJECT): if pos == None : pos = 0 self.etapes.insert(pos,objet) self.editmode=0 + self.reset_context() self.active_etapes() return objet elif name == "PARAMETRE_EVAL": @@ -93,6 +125,7 @@ class JDC(I_OBJECT.OBJECT): if pos == None : pos = 0 self.etapes.insert(pos,objet) self.editmode=0 + self.reset_context() self.active_etapes() return objet elif type(name)==types.InstanceType: @@ -100,10 +133,8 @@ class JDC(I_OBJECT.OBJECT): # existante (par copie donc) # on est donc nécessairement en mode editeur ... objet = name - objet.jdc = objet.parent = self - #XXX current_step n'existe plus. A priori le parent devrait etre self - # ainsi que le step courant. - #objet.parent = self.current_step + # Il ne faut pas oublier de reaffecter le parent d'obj (si copie) + objet.reparent(self) self.set_current_step() if isinstance(objet,ETAPE): if objet.nom_niveau_definition == 'JDC': @@ -115,8 +146,12 @@ class JDC(I_OBJECT.OBJECT): objet.parent.dict_niveaux[objet.nom_niveau_definition].register(objet) objet.niveau = objet.parent.dict_niveaux[objet.nom_niveau_definition] self.etapes.insert(pos,objet) + # il faut vérifier que les concepts utilisés par objet existent bien + # à ce niveau d'arborescence + objet.verif_existence_sd() self.active_etapes() self.editmode=0 + self.reset_context() return objet else : # On veut ajouter une nouvelle commande @@ -125,11 +160,13 @@ class JDC(I_OBJECT.OBJECT): cmd=self.get_cmd(name) # L'appel a make_objet n'a pas pour effet d'enregistrer l'étape # auprès du step courant car editmode vaut 1 + # Par contre elle a le bon parent grace a set_current_step e=cmd.make_objet() if pos == None : pos = 0 self.etapes.insert(pos,e) self.reset_current_step() self.editmode=0 + self.reset_context() self.active_etapes() return e except: @@ -151,13 +188,15 @@ class JDC(I_OBJECT.OBJECT): def get_sd_avant_etape(self,nom_sd,etape): return self.get_contexte_avant(etape).get(nom_sd,None) - def get_sd_apres_etape(self,nom_sd,etape): + def get_sd_apres_etape(self,nom_sd,etape,avec='non'): """ Cette méthode retourne la SD de nom nom_sd qui est éventuellement - définie apres etape + définie apres etape + Si avec vaut 'non' exclut etape de la recherche """ ietap=self.etapes.index(etape) - for e in self.etapes[ietap+1:]: + if avec == 'non':ietap=ietap+1 + for e in self.etapes[ietap:]: sd=e.get_sdprods(nom_sd) if sd: if hasattr(e,'reuse'): @@ -165,16 +204,17 @@ class JDC(I_OBJECT.OBJECT): return sd return None - def get_sd_autour_etape(self,nom_sd,etape): + def get_sd_autour_etape(self,nom_sd,etape,avec='non'): """ Fonction: retourne la SD de nom nom_sd qui est éventuellement définie avant ou apres etape Permet de vérifier si un concept de meme nom existe dans le périmètre d'une étape + Si avec vaut 'non' exclut etape de la recherche """ sd=self.get_sd_avant_etape(nom_sd,etape) if sd:return sd - return self.get_sd_apres_etape(nom_sd,etape) + return self.get_sd_apres_etape(nom_sd,etape,avec) def active_etapes(self): """ @@ -267,6 +307,12 @@ class JDC(I_OBJECT.OBJECT): """ self.params.append(param) + def register_fonction(self,fonction): + """ + Cette méthode sert à ajouter une fonction dans la liste des fonctions + """ + self.fonctions.append(fonction) + def delete_param(self,param): """ Supprime le paramètre param de la liste des paramètres @@ -297,6 +343,14 @@ class JDC(I_OBJECT.OBJECT): nom = form.nom if not nom : continue if d.has_key(nom): l_fonctions.append(form.get_formule()) + + # on ajoute les concepts produits par DEFI_VALEUR + # XXX On pourrait peut etre faire plutot le test sur le type + # de concept : entier, reel, complexe, etc. + for k,v in d.items(): + if hasattr(v,'etape') and v.etape.nom in ('DEFI_VALEUR',): + l_constantes.append(k) + # on retourne les deux listes return l_constantes,l_fonctions @@ -373,3 +427,69 @@ class JDC(I_OBJECT.OBJECT): linecache.cache[file]=0,0,string.split(text,'\n'),file return file,text + + def get_genealogie(self): + """ + Retourne la liste des noms des ascendants de l'objet self + jusqu'à la première ETAPE parent. + """ + return [] + + def NommerSdprod(self,sd,sdnom): + """ + Nomme la SD apres avoir verifie que le nommage est possible : nom + non utilise + Si le nom est deja utilise, leve une exception + Met le concept créé dans le concept global g_context + """ + # XXX En mode editeur dans EFICAS, le nommage doit etre géré différemment + # Le dictionnaire g_context ne représente pas le contexte + # effectif avant une étape. + # Il faut utiliser get_contexte_avant avec une indication de l'étape + # traitée. Pour le moment, il n'y a pas de moyen de le faire : ajouter + # un attribut dans le JDC ??? + if CONTEXT.debug : print "JDC.NommerSdprod ",sd,sdnom + if self._etape_context: + o=self.get_contexte_avant(self._etape_context).get(sdnom,None) + else: + o=self.g_context.get(sdnom,None) + if isinstance(o,ASSD): + raise AsException("Nom de concept deja defini : %s" % sdnom) + + # ATTENTION : Il ne faut pas ajouter sd dans sds car il s y trouve deja. + # Ajoute a la creation (appel de reg_sd). + self.g_context[sdnom]=sd + sd.nom=sdnom + + def set_etape_context(self,etape): + """ + Positionne l'etape qui sera utilisee dans NommerSdProd pour + decider si le concept passé pourra etre nommé + """ + self._etape_context=etape + + def reset_context(self): + """ + Cette methode reinitialise le contexte glissant pour pouvoir + tenir compte des modifications de l'utilisateur : création + de commandes, nommage de concepts, etc. + """ + self.current_context={} + self.index_etape_courante=0 + + def del_param(self,param): + """ + Supprime le paramètre param de la liste des paramètres + et du contexte gobal + """ + if param in self.params : self.params.remove(param) + if self.g_context.has_key(param.nom) : del self.g_context[param.nom] + + def del_fonction(self,fonction): + """ + Supprime la fonction fonction de la liste des fonctions + et du contexte gobal + """ + if fonction in self.fonctions : self.fonctions.remove(fonction) + if self.g_context.has_key(fonction.nom) : del self.g_context[fonction.nom] + diff --git a/Ihm/I_JDC_CATA.py b/Ihm/I_JDC_CATA.py index 945ced80..751cacda 100644 --- a/Ihm/I_JDC_CATA.py +++ b/Ihm/I_JDC_CATA.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from Noyau import N_JDC_CATA class JDC_CATA: diff --git a/Ihm/I_MACRO_ETAPE.py b/Ihm/I_MACRO_ETAPE.py index be318d25..59ddb8e9 100644 --- a/Ihm/I_MACRO_ETAPE.py +++ b/Ihm/I_MACRO_ETAPE.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ # Modules Python @@ -7,10 +26,19 @@ import traceback,types,string import I_ETAPE from Noyau.N_ASSD import ASSD +# import rajoutés suite à l'ajout de Build_sd --> à résorber +import Noyau +from Noyau import N_Exception +from Noyau.N_Exception import AsException +# fin import à résorber + class MACRO_ETAPE(I_ETAPE.ETAPE): def __init__(self): I_ETAPE.ETAPE.__init__(self) + # XXX CCAR : ne suis pas certain que typret doive etre + # initialise à None (a verifier) + self.typret=None def get_sdprods(self,nom_sd): """ @@ -61,6 +89,10 @@ class MACRO_ETAPE(I_ETAPE.ETAPE): context_ini = context_ini, appli=self.jdc.appli) j.analyse() + # XXX en passant par un jdc auxiliaire, on risque de rendre les etapes inactives + # on les force dans l'etat actif + for etape in j.etapes: + etape.active() except: traceback.print_exc() return None @@ -146,3 +178,51 @@ class MACRO_ETAPE(I_ETAPE.ETAPE): # On met g_context à blanc self.g_context={} + def Build_sd(self,nom): + """ + Construit le concept produit de l'opérateur. Deux cas + peuvent se présenter : + + - le parent n'est pas défini. Dans ce cas, l'étape prend en charge + la création et le nommage du concept. + + - le parent est défini. Dans ce cas, l'étape demande au parent la + création et le nommage du concept. + + """ + if not self.isactif():return + # CCAR : meme modification que dans I_ETAPE + if not self.isvalid(sd='non') : return + else:self.state='undetermined' + try: + # On positionne la macro self en tant que current_step pour que les + # étapes créées lors de l'appel à sd_prod et à op_init aient la macro + # comme parent + self.set_current_step() + if self.parent: + sd= self.parent.create_sdprod(self,nom) + if type(self.definition.op_init) == types.FunctionType: + apply(self.definition.op_init,(self,self.parent.g_context)) + else: + sd=self.get_sd_prod() + if sd != None and self.reuse == None: + # On ne nomme le concept que dans le cas de non reutilisation + # d un concept + sd.nom=nom + self.reset_current_step() + if self.jdc and self.jdc.par_lot == "NON" : + self.Execute() + return sd + except AsException,e: + self.reset_current_step() + raise AsException("Etape ",self.nom,'ligne : ',self.appel[0], + 'fichier : ',self.appel[1],e) + except EOFError: + #self.reset_current_step() + raise + except : + self.reset_current_step() + l=traceback.format_exception(sys.exc_info()[0],sys.exc_info()[1],sys.exc_info()[2]) + raise AsException("Etape ",self.nom,'ligne : ',self.appel[0], + 'fichier : ',self.appel[1]+'\n', + string.join(l)) diff --git a/Ihm/I_MCBLOC.py b/Ihm/I_MCBLOC.py index 7b8281d8..7b548225 100644 --- a/Ihm/I_MCBLOC.py +++ b/Ihm/I_MCBLOC.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== import I_MCCOMPO class MCBLOC(I_MCCOMPO.MCCOMPO): def makeobjet(self): diff --git a/Ihm/I_MCCOMPO.py b/Ihm/I_MCCOMPO.py index 24f71cca..e392d1b0 100644 --- a/Ihm/I_MCCOMPO.py +++ b/Ihm/I_MCCOMPO.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ import string,types @@ -25,24 +44,6 @@ class MCCOMPO(I_OBJECT.OBJECT): else: return self.nom - def get_genealogie(self): - """ - Retourne la liste des noms des ascendants (noms de MCSIMP,MCFACT,MCBLOC - ou ETAPE) de self jusqu'au premier objet etape rencontré - """ - l=[] - objet = self - while objet.definition.label != 'JDC' : - if not objet.isMCList() : - l.append(string.strip(objet.nom)) - else : - pass - # Si objet.etape == etape c'est que objet est l'étape origine de la généalogie - if objet.etape == objet: break - objet = objet.parent - l.reverse() - return l - def get_liste_mc_ordonnee(self,liste,dico): """ Retourne la liste ordonnée (suivant le catalogue) des mots-clés @@ -113,6 +114,20 @@ class MCCOMPO(I_OBJECT.OBJECT): liste.remove(k) if self.definition.entites[k].label=='BLOC': liste.remove(k) + # Pour corriger les exces qui pourraient etre commis dans la methode purge_liste + # des regles, on essaie de compenser comme suit : + # on ajoute les mots cles facteurs presents dont l'occurence n'est pas atteinte + for k in liste_mc_presents: + if k in liste:continue + objet = self.get_child(k,restreint = 'oui') + if isinstance(objet,MCFACT): + # un mot-clé facteur ne peut pas être répété plus de self.max fois + if objet.definition.max > 1: + liste.append(k) + elif isinstance(objet,MCList): + nb_occur_maxi = objet[0].definition.max + if len(objet) < nb_occur_maxi: + liste.append(k) return liste def liste_mc_presents(self): @@ -178,6 +193,7 @@ class MCCOMPO(I_OBJECT.OBJECT): """ self.init_modif() if type(name)==types.StringType : + # on est en mode création d'un motcle if self.ispermis(name) == 0 : return 0 objet=self.definition.entites[name](val=None,nom=name,parent=self) if hasattr(objet.definition,'position'): @@ -186,7 +202,9 @@ class MCCOMPO(I_OBJECT.OBJECT): elif objet.definition.position == 'global_jdc' : self.append_mc_global_jdc(objet) else : + # dans ce cas on est en mode copie d'un motcle objet = name + objet.verif_existence_sd() # si un objet de même nom est déjà présent dans la liste # et si l'objet est répétable # il faut créer une MCList et remplacer l'objet de la liste @@ -219,6 +237,8 @@ class MCCOMPO(I_OBJECT.OBJECT): new_obj.init(objet.nom,self) new_obj.append(old_obj) new_obj.append(objet) + # Il ne faut pas oublier de reaffecter le parent d'obj + objet.reparent(self) self.mc_liste.remove(old_obj) self.mc_liste.insert(index,new_obj) self.fin_modif() @@ -227,12 +247,16 @@ class MCCOMPO(I_OBJECT.OBJECT): # une liste d'objets de même type existe déjà #print "une liste d'objets de même type existe déjà" old_obj.append(objet) + # Il ne faut pas oublier de reaffecter le parent d'obj + objet.reparent(self) self.fin_modif() return old_obj if pos == None : self.mc_liste.append(objet) else : self.mc_liste.insert(pos,objet) + # Il ne faut pas oublier de reaffecter le parent d'obj (si copie) + objet.reparent(self) self.fin_modif() return objet @@ -304,11 +328,18 @@ class MCCOMPO(I_OBJECT.OBJECT): def copy(self): """ Retourne une copie de self """ objet = self.makeobjet() + # FR : attention !!! avec makeobjet, objet a le même parent que self + # ce qui n'est pas du tout bon dans le cas d'une copie !!!!!!! + # FR : peut-on passer par là autrement que dans le cas d'une copie ??? + # FR --> je suppose que non + # XXX CCAR : le pb c'est qu'on vérifie ensuite quel parent avait l'objet + # Il me semble preferable de changer le parent a la fin quand la copie est acceptee objet.valeur = copy(self.valeur) objet.val = copy(self.val) objet.mc_liste=[] for obj in self.mc_liste: new_obj = obj.copy() + new_obj.reparent(objet) objet.mc_liste.append(new_obj) return objet @@ -333,9 +364,9 @@ class MCCOMPO(I_OBJECT.OBJECT): for child in self.mc_liste : if child.isvalid() : continue l_child = child.get_liste_mc_inconnus() - if l_child : + for mc in l_child: l = [self] - l.extend(l_child) + l.extend(mc) l_mc.append(l) return l_mc @@ -365,3 +396,20 @@ class MCCOMPO(I_OBJECT.OBJECT): liste_retraits.append(k) return liste_ajouts,liste_retraits + def reparent(self,parent): + """ + Cette methode sert a reinitialiser la parente de l'objet + """ + self.parent=parent + self.jdc=parent.get_jdc_root() + self.etape=parent.etape + for mocle in self.mc_liste: + mocle.reparent(self) + + def verif_existence_sd(self): + """ + Vérifie que les structures de données utilisées dans self existent bien dans le contexte + avant étape, sinon enlève la référence à ces concepts + """ + for motcle in self.mc_liste : + motcle.verif_existence_sd() diff --git a/Ihm/I_MCFACT.py b/Ihm/I_MCFACT.py index 08ab1f16..39670364 100644 --- a/Ihm/I_MCFACT.py +++ b/Ihm/I_MCFACT.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== import I_MCCOMPO class MCFACT(I_MCCOMPO.MCCOMPO): def isrepetable(self): diff --git a/Ihm/I_MCLIST.py b/Ihm/I_MCLIST.py index c08a3834..7e1f6e0d 100644 --- a/Ihm/I_MCLIST.py +++ b/Ihm/I_MCLIST.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== from copy import copy class MCList: @@ -28,9 +47,13 @@ class MCList: return 0 def isoblig(self): - for i in self.data: - if i.isoblig():return 1 - return 0 + """ + Une MCList n'est jamais obligatoire (même si le MCFACT qu'elle représente l'est + """ + return 0 + #for i in self.data: + # if i.isoblig():return 1 + #return 0 def liste_mc_presents(self): return [] @@ -49,11 +72,17 @@ class MCList: child.delete_concept(sd) def copy(self): + """ + Réalise la copie d'une MCList + """ liste = self.data[0].definition.list_instance() - # XXX Pas de parent ?? - liste.init(self.nom) + # FR -->Il faut spécifier un parent pour la méthode init qui attend 2 arguments ... + liste.init(self.nom,self.parent) for objet in self: new_obj = objet.copy() + # Pour etre coherent avec le constructeur de mots cles facteurs N_FACT.__call__ + # dans lequel le parent de l'element d'une MCList est le parent de la MCList + new_obj.reparent(self.parent) liste.append(new_obj) return liste @@ -68,10 +97,10 @@ class MCList: for mcfact in self.data : if mcfact.isvalid() : continue l_child = mcfact.get_liste_mc_inconnus() - if l_child : - l = [self] - l.extend(l_child) - l_mc.append(l) + for mc in l_child: + l = [self] + l.extend(mc) + l_mc.append(l) return l_mc def verif_condition_regles(self,liste_presents): @@ -93,3 +122,72 @@ class MCList: # Sans objet pour une liste de mots clés facteurs return [],[] + def init_modif(self): + """ + Met l'état de l'objet à modified et propage au parent + qui vaut None s'il n'existe pas + """ + self.state = 'modified' + if self.parent: + self.parent.init_modif() + + def get_etape(self): + """ + Retourne l'étape à laquelle appartient self + Un objet de la catégorie etape doit retourner self pour indiquer que + l'étape a été trouvée + XXX double emploi avec self.etape ??? + """ + if self.parent == None: return None + return self.parent.get_etape() + + def get_genealogie(self): + """ + Retourne la liste des noms des ascendants. + Un objet MCList n'est pas enregistré dans la genealogie. + XXX Meme si le MCFACT fils ne l'est pas lui non plus ???? + """ + if self.parent: + return self.parent.get_genealogie() + else: + return [] + + def get_liste_mc_ordonnee_brute(self,liste,dico): + """ + Retourne la liste ordonnée (suivant le catalogue) BRUTE des mots-clés + d'une entité composée dont le chemin complet est donné sous forme + d'une liste du type :ETAPE + MCFACT ou MCBLOC + ... + """ + for arg in liste: + objet_cata = dico[arg] + dico=objet_cata.dico + return objet_cata.liste + + def reparent(self,parent): + """ + Cette methode sert a reinitialiser la parente de l'objet + """ + self.parent=parent + self.jdc=parent.jdc + self.etape=parent.etape + for mcfact in self.data: + mcfact.reparent(parent) + + def verif_existence_sd(self): + """ + Vérifie que les structures de données utilisées dans self existent bien dans le contexte + avant étape, sinon enlève la référence à ces concepts + """ + for motcle in self.data : + motcle.verif_existence_sd() + + def get_sd_utilisees(self): + """ + Retourne la liste des concepts qui sont utilisés à l'intérieur de self + ( comme valorisation d'un MCS) + """ + l=[] + for motcle in self.data: + l.extend(motcle.get_sd_utilisees()) + return l + diff --git a/Ihm/I_MCSIMP.py b/Ihm/I_MCSIMP.py index 96fe6ccd..4fa441de 100644 --- a/Ihm/I_MCSIMP.py +++ b/Ihm/I_MCSIMP.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== import types,string import traceback from copy import copy @@ -7,10 +26,21 @@ myrepr.maxstring = 100 myrepr.maxother = 100 from Noyau.N_utils import repr_float + +# Attention : les classes ASSD,.... peuvent etre surchargées +# dans le package Accas. Il faut donc prendre des précautions si +# on utilise les classes du Noyau pour faire des tests (isxxxx, ...) +# Si on veut créer des objets comme des CO avec les classes du noyau +# ils n'auront pas les conportements des autres packages (pb!!!) +# Il vaut mieux les importer d'Accas mais problème d'import circulaire, +# on ne peut pas les importer au début. +# On fait donc un import local quand c'est nécessaire (peut occasionner +# des pbs de prformance). from Noyau.N_ASSD import ASSD,assd from Noyau.N_GEOM import GEOM,geom from Noyau.N_CO import CO -from Noyau.N_EVAL import EVAL +# fin attention + from Extensions import parametre import I_OBJECT @@ -82,7 +112,8 @@ class MCSIMP(I_OBJECT.OBJECT): """ for typ in self.definition.type: if type(typ) == types.ClassType : - if typ is CO : return 1 + if issubclass(typ,CO) : + return 1 return 0 def wait_assd(self): @@ -104,7 +135,7 @@ class MCSIMP(I_OBJECT.OBJECT): """ for typ in self.definition.type: if type(typ) == types.ClassType : - if typ in (GEOM,ASSD,geom,assd) or issubclass(typ,GEOM) : + if typ.__name__ in ("GEOM","ASSD","geom","assd") or issubclass(typ,GEOM) : return 1 return 0 @@ -165,6 +196,8 @@ class MCSIMP(I_OBJECT.OBJECT): # type de nom new_valeur if self.wait_co(): try: + # Pour avoir la classe CO avec tous ses comportements + from Accas import CO self.valeur=CO(new_valeur) except: traceback.print_exc() @@ -204,6 +237,8 @@ class MCSIMP(I_OBJECT.OBJECT): return sd,1 else: d={} + # On veut EVAL avec tous ses comportements. On utilise Accas. Perfs ?? + from Accas import EVAL d['EVAL']=EVAL try : objet = eval(new_valeur,d) @@ -238,9 +273,13 @@ class MCSIMP(I_OBJECT.OBJECT): def copy(self): """ Retourne une copie de self """ objet = self.makeobjet() - #XXX est ce utile ?? - objet.valeur = copy(self.valeur) - objet.val = copy(self.val) + # il faut copier les listes et les tuples mais pas les autres valeurs + # possibles (réel,SD,...) + if type(self.valeur) in (types.ListType,types.TupleType): + objet.valeur = copy(self.valeur) + else: + objet.valeur = self.valeur + objet.val = objet.valeur return objet def makeobjet(self): @@ -257,3 +296,100 @@ class MCSIMP(I_OBJECT.OBJECT): if issubclass(self.valeur.__class__,ASSD) : l.append(self.valeur) return l + + def set_valeur_co(self,nom_co): + """ + Affecte à self l'objet de type CO et de nom nom_co + """ + step=self.etape.parent + if nom_co == None or nom_co == '': + new_objet=None + else: + # Pour le moment on importe en local le CO de Accas. + # Si problème de perfs, il faudra faire autrement + from Accas import CO + # Avant de créer un concept il faut s'assurer du contexte : step + # courant + sd= step.get_sd_autour_etape(nom_co,self.etape,avec='oui') + if sd: + # Si un concept du meme nom existe deja dans la portée de l'étape + # on ne crée pas le concept + return 0,"un concept de meme nom existe deja" + # Il n'existe pas de concept de meme nom. On peut donc le créer + # Il faut néanmoins que la méthode NommerSdProd de step gère les + # contextes en mode editeur + # Normalement la méthode du Noyau doit etre surchargée + # On déclare l'étape du mot clé comme etape courante pour NommerSdprod + cs= CONTEXT.get_current_step() + CONTEXT.unset_current_step() + CONTEXT.set_current_step(step) + step.set_etape_context(self.etape) + new_objet = CO(nom_co) + CONTEXT.unset_current_step() + CONTEXT.set_current_step(cs) + self.valeur = new_objet + self.val = new_objet + self.init_modif() + step.reset_context() + # On force l'enregistrement de new_objet en tant que concept produit + # de la macro en appelant get_type_produit avec force=1 + self.etape.get_type_produit(force=1) + return 1,"Concept créé" + + def reparent(self,parent): + """ + Cette methode sert a reinitialiser la parente de l'objet + """ + self.parent=parent + self.jdc=parent.jdc + self.etape=parent.etape + + def verif_existence_sd(self): + """ + Vérifie que les structures de données utilisées dans self existent bien dans le contexte + avant étape, sinon enlève la référence à ces concepts + """ + l_sd_avant_etape = self.jdc.get_contexte_avant(self.etape).values() + if type(self.valeur) in (types.TupleType,types.ListType) : + l=[] + for sd in self.valeur: + if isinstance(sd,ASSD) : + if sd in l_sd_avant_etape : + l.append(sd) + else: + l.append(sd) + self.valeur=l + self.init_modif() + else: + if isinstance(self.valeur,ASSD) : + if self.valeur not in l_sd_avant_etape : + self.valeur = None + self.init_modif() + + + def get_min_max(self): + """ + Retourne les valeurs min et max admissibles pour la valeur de self + """ + return self.definition.min,self.definition.max + + + def get_type(self): + """ + Retourne le type attendu par le mot-clé simple + """ + return self.definition.type + + + + + + + + + + + + + + diff --git a/Ihm/I_OBJECT.py b/Ihm/I_OBJECT.py index 559ebcd5..ee6a848d 100644 --- a/Ihm/I_OBJECT.py +++ b/Ihm/I_OBJECT.py @@ -1,7 +1,32 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ +import string + +import Noyau class OBJECT: + from Noyau.N_CO import CO + from Noyau.N_ASSD import assd + def isMCList(self): """ Retourne 1 si self est une MCList (liste de mots-clés), @@ -80,4 +105,23 @@ class OBJECT: """ return [],[] + def get_genealogie(self): + """ + Retourne la liste des noms des ascendants (noms de MCSIMP,MCFACT,MCBLOC + ou ETAPE) de self jusqu'au premier objet etape rencontré + """ + if self.parent: + l=self.parent.get_genealogie() + l.append(string.strip(self.nom)) + return l + else: + return [string.strip(self.nom)] + + def reparent(self,parent): + """ + Cette methode sert a reinitialiser la parente de l'objet + """ + self.parent=parent + self.jdc=parent.jdc + diff --git a/Ihm/I_PRESENT_ABSENT.py b/Ihm/I_PRESENT_ABSENT.py index 5ddd4a80..796d777a 100644 --- a/Ihm/I_PRESENT_ABSENT.py +++ b/Ihm/I_PRESENT_ABSENT.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ @@ -9,8 +28,9 @@ class PRESENT_ABSENT(I_REGLE.REGLE): if self.mcs[0] in liste_mc_presents:regle_active=1 if not regle_active : return liste_a_purger - for mc in self.mcs: - if mc in liste_a_purger: + # Il ne faut pas purger le mot cle present + for mc in self.mcs[1:]: + if mc in liste_a_purger : liste_a_purger.remove(mc) return liste_a_purger diff --git a/Ihm/I_PRESENT_PRESENT.py b/Ihm/I_PRESENT_PRESENT.py index e6a841e3..fbd6f681 100644 --- a/Ihm/I_PRESENT_PRESENT.py +++ b/Ihm/I_PRESENT_PRESENT.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ diff --git a/Ihm/I_PROC_ETAPE.py b/Ihm/I_PROC_ETAPE.py index ddfdabeb..81d6c810 100644 --- a/Ihm/I_PROC_ETAPE.py +++ b/Ihm/I_PROC_ETAPE.py @@ -1,4 +1,32 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== import I_ETAPE + + +# import rajoutés suite à l'ajout de Build_sd --> à résorber +import traceback,types +import Noyau +from Noyau import N_Exception +from Noyau.N_Exception import AsException +# fin import à résorber + class PROC_ETAPE(I_ETAPE.ETAPE): def get_sdname(self): return "" @@ -24,3 +52,30 @@ class PROC_ETAPE(I_ETAPE.ETAPE): for child in self.mc_liste : child.delete_concept(sd) + def Build_sd(self): + """ + Cette methode applique la fonction op_init au contexte du parent + et lance l'exécution en cas de traitement commande par commande + Elle doit retourner le concept produit qui pour une PROC est toujours None + En cas d'erreur, elle leve une exception : AsException ou EOFError + """ + if not self.isactif():return + try: + if self.parent: + if type(self.definition.op_init) == types.FunctionType: + apply(self.definition.op_init,(self,self.parent.g_context)) + else: + pass + if self.jdc.par_lot == "NON" : + self.Execute() + except AsException,e: + raise AsException("Etape ",self.nom,'ligne : ',self.appel[0], + 'fichier : ',self.appel[1],e) + except EOFError: + self.reset_current_step() + raise + except : + l=traceback.format_exception(sys.exc_info()[0],sys.exc_info()[1],sys.exc_info()[2]) + raise AsException("Etape ",self.nom,'ligne : ',self.appel[0], + 'fichier : ',self.appel[1]+'\n', + string.join(l)) diff --git a/Ihm/I_REGLE.py b/Ihm/I_REGLE.py index 1ff738f3..52a0c47a 100644 --- a/Ihm/I_REGLE.py +++ b/Ihm/I_REGLE.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ import string diff --git a/Ihm/I_UN_PARMI.py b/Ihm/I_UN_PARMI.py index a600514d..bd1ef701 100644 --- a/Ihm/I_UN_PARMI.py +++ b/Ihm/I_UN_PARMI.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ """ @@ -14,8 +33,9 @@ class UN_PARMI(I_REGLE.REGLE): if not regle_active : return liste_a_purger # Si un des mots clés est présent, on les enlève tous + # sauf celui ci for mc in self.mcs: - if mc in liste_a_purger: + if mc in liste_a_purger and mc not in liste_mc_presents: liste_a_purger.remove(mc) return liste_a_purger diff --git a/Ihm/__init__.py b/Ihm/__init__.py index a2c6164b..f12fbf81 100644 --- a/Ihm/__init__.py +++ b/Ihm/__init__.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce package contient les fonctionnalités supplémentaires nécessaires pour l'éditeur graphique EFICAS diff --git a/Installation/Doc_technique_install.doc b/Installation/Doc_technique_install.doc new file mode 100755 index 0000000000000000000000000000000000000000..285a3549f886257670f9fd2c2790cb29b687d7ff GIT binary patch literal 49152 zcmeI5349dg`Nt;-;a(tIq9P0;8Wf@&RYAawfPx}WE-y4Jn@zHk?1tS9hZnZ>Y&|L7 z*y2^K{n*xeUx?PLRZ;)esuU3skZ8T|!UOn!fA74LY%Z>7)i#sQH_yE9%)B!@^Ul1_ zywCeQ^WqCRt8ch-kGGs!(+DTa*|N2j(>yIdgZWH9-NA9%GOxTXTeogib`~((H2sLq zz$7QmU&?Wv(M}ARaOQIrgEj6#N;3a8A8nB(wjmP*#X zOvzPM&t_=hj6Iyp3@z~M9`pYipQAH@CNhU@TQ3ICY>*YAJ7 z&iT&)|Nd{mxoHjla^(j|OSZRCEkF)*gig>C{PlN4>YnZedqZ#72l~LiupbP7^l}=y z{|B<(AQ%ikfrH@?I26Xfj@!t6@pC3#9(QpimgJWSlOb36RoslQA-6|d~VVmqH`GpXHuxAu9cY&UORh@+H%s)!sl{L zyRP~B|20f)dls{qAUT46lBZKaB8& z)boBd=sBw8y0)r|dJe12Dg@~krJ(bh0^RFpfa>Zw&=xKN9phRyQd^|FF{6(iJ9*-m z(UV3`_Kx*I@0e8&b?j;fRhA}Swxv*&qcYUCjEaXV$|A9p(VN^NlGpu3GuIBUn)$&D?Uy!O37a;Y_ zTZGi}aS2lO?KY(9)1Q%g?%j_}uTPDw3#v~PX%0^F`Yp%iQ!!Dds+N&gJ)dpnb?oEg ziLy{>USXWdUt?QmO19EE&LPe~3XmEBCQ7Xys@lgU*pQeUz0)TX~F?)2uws z$~jh^X65NtF0k@vRxUO&=-g=2H(7bJmA|v{Rx9tY@-8dyw(?~wU$yczD_2^%%F6ex z{KCpjMh2ZNHr-E;U(VlAMh2aq+H{eXQ7cci%P+O*%dEWI%4_ZNJFPresx;-EZ{-C> z2Aykc`T;8+vH8#1bnb!PcE=hSbpB-1U3+=?ciMD!o4(7Ydzf_4iP&_JmBmH|of0eW zwfTRy@*|t?sHx|84>L081Z{epl~b*ZTX}|+=NcJwereNxvhop||A9?^Xys>Cc9UA+ z1f3p6<~u#Dbgk@THvM;-_RrrbHh+~puUGKtBJa@Z5H`pEafS#})41}Yh z2rht&;9|HEu7XEk89WYug(u((Xvs6YBXokjU^E;F)8IG=!)!PgZi3&zZSW}k9iD^d z;U)MKTGJMEhAuE3E{7}Nes~Gm(KfV)t}qf#ffD#5+z+q7Yp@BnKuey(z2N|u0#jic zoD2nU0W5~6VFUad-iHt1OW3z9=Lh;iIh+Pp!!>X%+yd`I^8ovTZg3C`fPpXpilG$d z!PW3Otbnz!9$L2JH$yHAgh4PErb7YDfM3BC@EceHkHMR;8s366@HMDSRK?m0dO%P3 z2^<24!EhK2)1VMy5QlP@4QIm7;TLcooDUbnBDezXgnQvWxE~&Zhv8{>2Ht`9;NS2O zY=i*qb0_EwU0^rp20dUO=mVo*42*?iVFH{2B@l%;To3od;>PEg%nu!8NcH{t2(aDp(C`U>&sW#4$rVXb;0+BFuqvVHrFLFTo1<6f!!q zA7~GQ;Rr}V3QmLT;U>5lZh_n3d3YIKf!ARDWhfd`qGge!J3cbkofIz%#hkWXFQZRw z^8B)y@lvPFzFH+e5e=0(9joWv@u5T_K9_g5W=?s_i%=DxK(+Wit8zisOgnGl+G*z< z3ay-xzs_W@Eo3`L!qiJov|_H<)JpwXAc*wYT)Q@TK;k z=|Ov>e#yS{*Ynn@{_o}Mu2Y{5KgGN|(dL_XCfZr^u0;E1meVeocOu#j^Dd-qnx-HB z8K|x|e*N*K>PLbnK<#=|JFPnYPCQ}CmhPPmDb;X63(x#{11v_$OXd0XjdhmQp)6VYyTiR_^F+b-0 zt9q_>3!@3TDOI~BOm-tFGaI4?Rwg5{u$CmR@D#&jyrLw;eG>@;x;QugJnxpL@_%<> z_N^CY-*#d4?=Q^0oz^-xToNgx=e2hKYa|uU%ggKAukNiq7+H&2koVU`2 zHEt+3w>+d>aKDF=<`&bL)Gy@Zx$z365|!nVL@Le+Pxf;Q6Y*%uZV^pYkjJU?j!5UU zG~$LSurgdy$t~T_Wy`WiD&<|PGGnBVcn^}w(n{UYNjFp!jaC0hmfDl<9gWx7+)s_T zKhf~3H$b}HdiWSxpaisp!(j@X2iL#@@F4sXK7-Gph@1H|cobH`8?XvKg)blz#i2V) zhudK}tb|NnV0*v-D1u@*3(kWp;7V8w*TW;Q6kddv;T8A{wcp9FEO|LK&O}r^9vdI6Mo>;RSdRUV%4Y z1Ejwc59WnbFT@AK@h}}uh9W2iz3g5Fo1L#WZ+14@Nr~!|$uwF1@*S67f8kHfPtJ0} zdJn6}aI%lX1ZQmyt-9W zyy0b9VV6DRWR&;b=seVHYkBY2Gi>TQWv+L&EwXB_@?NbC=6gl^)x28vqC-6^&?aYP zR;P7a+78~DAw5^EQHHapZIte-Uc3G|ES=d|IsKho++0>qa|~lLcKsM!dJNj+G^PZ8 zEqy@k`TZH#H>rS3d+-YL@zzXabI+7O`>uDBkX{k%Og)_Z;Kr>t@aB^gk8hnQN$B zHb*erosy@S+`fU4rJ-ap;s$Io8jGgT1ENW;E+sN!lmi+`6p4yN(yUidjx9A(U@A^- z-&UG>yAx({ra9v*>F-sk@l(_QPaQw@cyBAK&lHr;=VZj#_Z;Tj;chaOh?W+QY(-2^?v96DE)S|nYJ23_^quW9yR()Yt=QOtePG3Id%yuy<@ zG`2S9$ZP+TOK)%dnyxs)cQ)etK!;TX(?ioQpO~ukV#4@lazv_ z@-DM!DQenY%9@r-VUv{7rhF-GN=tc@lmaLDqLotQl$J85^`+2BN~u%66gx>Ncal=@ zB&FnOJt=yUQudTDg-=pSpQIE&Etm4Av=l%|DS?tw1SO>mYCW~Dl2QWoJEaIpN*R=t zLa6I5rBG=phLTbaC8Z!rF0}I3Mh1*@b z8l?6=&d7Y{M4OJ;^hH))YUSlt-e%=pMh2Y^Z2ChhKe72;d1C1J`dN9fm4_HfJ+bM# zth~?WudveeA+h~%^(7%k7#Va%TbZ!=7u)nzHvNW`?^xN4K@{4)g^@vLKb!7va+Q^DTDjWF_pBVG5x0~(&dTvto?>LsnPcT#E9cqeS6F$6m4C5vsgXgi zmz(3uS8q4vA7SM zEBhK5bi#eS{6Z@uRu);gz{+!s3_43}`UWeThQN5|uW1O3&O_4>nD1i^vracHfcz6vH_`a%WcKY5-;MMluRK50J z-%rLrP)RBJ+nrFKW&hRSYuSHg2iCMLDNW&XX)3IrJA!^Fy*i9Go7F32|J|46gY9-& zbL&jc{(GX`Zdc`-SidqU?=5RbPM1T--{WY{?tAsIp6rSpSS{4ZuxJ0h4k`QZVDg`3 zKuGP$KM(%#Roj349ADPn($Dv$_Mqu*d!&BJzVz4g)~f#R=lk2$mRf!yH%aYsYNvIk z(x(~s<}B0*@l38Dy06m#Dc#H8t|93kk6)gS=K!|zk1Ks2-`@QHy8TbxMospgCi~9| z-04mBpCr0?@ zfE|Ew3K$nKi5X*tH-Lg3c$qSiu34*}CkjFZ;Y1{o=;tjgNJPp_hK2+%b_lCKM^w9< zc)7+`V8yCs`%1IJrTwyc)Fyd|{1dw8VV?$hg2?Nm?Sbg;AkPGO4_pO*hBswaT~SLc z^)j#b#F_OAv-25Rw%oC+)N?#Lo5edoO(X2E&0Y~Zat{aEbb2gv7dLlYV}Jd7W~V21 zwFs|-OR^hV!i1K)TtXW;Csq$hVHjCOA{+_0)ptXU#oVZ=Xv~hf(G471$e15lfAH&nnrfwcF@Q%8;*Jz3>?yH8YBBpG4kKY&J$95Z_4 z&aZEFR~DaxK{8qzsUF_sS>p=4VNLy9Z=V4@`BI4rGe}DFX_vy>)1?bT2`qx8SMS>?_v~PgHKw8s`t}-TBGd4)J!E_(g28K-a8(GJ2UK+{ujMZE#T~=#h zto`iitFv2=jkt2jP%h})XkjrAw9!1!<{ufwn(7Y{!@^rOvoM6kH0mnZ?|Le^>|IP3f9hH}pzRrL4 zm}Op-_uic#FTHy~UU%}i+Y0iylee8b?Z$yT?BXELI(gN}qwY^2Pda(geF*A0l;@nh z=HxLaZ#j9&$xBWia`K9k2b{Y4Opwi;ao4@cHjsN!l8u#Uo0W;&j2CGfi_3p|w)AhX# zbPaXgCV;NXZLkt-+izR@Z3(;PZ@l}irugqU$5@`e1r4I{?f=qU*FjqE%=oWUos1b7 z^opM9w3rgrDAWPm(~KQ!nGwjyc_OpZu+3dQa=H#fA>%Q}FoKM;!T5#gnxj;1b86#E z{n^QxPPn@>3#G2a$u#>a@%KfY9K*iZS7y!y*^S&+YxXtG?5!J7BeKk%3jIA%)5kD$ zg*|2EjBDA*JvDdqo4U~#-puT!$lnX+XpDouPe!0wPKP#)+)GP)?z%CcGu!NEroW$` zD4tQa6Uff_N1%~=@qSBJ_R+lNJ`UDCnmd8!IahaRUX+H~NUzp*vF#AAyb?p%C zqlFV_ku$whBlnS|Yr?N+S@TyMsy(!H0xfggu8rJ-euef?f*JT*YQW;&m``JDGS$(Vg~ffDY9xy@3fg-H;%!ydh`Pt_mmoE zuWEzdI8fl(=pCGTL2-1D{lRYI7VhV{>{V?*uUXC05-qZ)rmE9Xdm296H655k>%C51 zW>uN~IyH};@O6=JofEi?W8@V2CHb;}YE=Jv+qO8l{X{vgZ-b#5%V3CJ}-!~QkYU&Hn_RR1o}(0UD*KeV0a2YD@0!{P4+4ToQ) z?wyUb#3Nqj5{dQBg8EXYc$qbY-JqsO*EQ?TyT$@@ee=fp(3Q2?^%CmXpLW=X&^!9# zM(n$n^&)J<8EB{LDA$En?Y#g_=*PbB{%aOd-JQH)>M@m?}de-C8Y*ot=U&B<52`iE0IcFYc zxUom_5|LsV4ije6T;=!GD1szjZ{8xcxfSJ!4b~9mxhQ%z{|3xGqbkd2oPBfGLYa}+ zJneVor5WfwqdgYfFqFoLISDUODHy+iQT7kN8+$L+^BNOLSTC73}5RRa&a?YHq8WLunxXC_)) zfRSE*hI?UcGr1MXrAY2X3b-aWBDoOBedv9V+mKv_{AYpOf-ZtfL9Re@1Ck5S zJ@6dJJ#Hn)tw=6GdTz)SNNzxSe#retu0L}7(Q`!ZK63TZ^F+f%<>n(7AG!C)wMT9} za_Nyfk6d}=#v>OVx$nqzM{YZE*^#@BTy^B8BNrXH=g2ijZaH$vkvooDapZ>69pr{1 z7aY0Y$kj$}Hgd6%dyQOc8oATRl}2tfa-os?j9h2rHY1lAxy#5^Ms6~zK!bth zA|v-0xyHyXMlLaOhmk9c++gGaBlj1%zR2z68*lo`N+Z77v}sd~bb6xZ{8!(wZu;aE zkiHUzN4);itUxn4(gvoc-rkx$WeuDrvVW+(y*gsWYHMaJqgf_SPo~q%-Ac>@hyPwj z;1D!FFQOZ{j_{^o2o2g-#D=rU{s`V=lWAFuY=@`dX?Ppf!jn8to`QEED;sSR4uBBM z1v%=z341rETquKEVFk1z+*oVq4FlkCmBm-ePJS?BFt&dccJ2Ilzxri!J2&0U-~Zk0J&QA(#axl?(HUF! z_SX3!F8{F{HwJ#=QZKzrW1uu{C<_PuPQ=C5GWCn--B|i)Y!CF?Uaa5W8w0DcFpAXK z3je0gI1_d=Up7KVv5m}-D<@z z0kz_f!+Y>Cs724F6?dTz42O|03KW=IE&Tr9bD)I1K zoD2#FaxPo~(iComXF&nH-+~QL317mVXbib9K$-&#fw3?P=D-3t56*`rpn%>lgS3rx z(2_dT30{U3uogaqbI>q;3DP*OglplCunOLWjj##6fmYPPQ=k|Yz@@Mdeg}DIB*S19 zoDGk_^UxJdq!-)(e}>*@BL~5JI3HT0iR=a^!KrWoTmk;O-JNJAOQAP)e;`bN>F_MP z27}Q~4u?``LEUd+Tj!wJcXWOZa7=9L-lK<3kI?TMN>0a@k=|(g)fv1Z%y(w^6i9e$ z@c2j~KF=LB(j7Dy*Nc=heY(k+UKl2W^r(@O2j&kRIMAuRV(m0fqMB2)=FJv4?`HP= z!fBqt6Y<(MgIX5y7SX~vJ`?4W|5^Os{=}{CETe8d!~40vzN9~&UP9;VPWWurh~|CV zpADpy^w!XS&1X0+Pw&TTY*v`Qaji1-RwVQVochQx`Lzo8FG^Mo^!Iv)ToY#P2xITF zCNF|=%4-HU8q@KFPmN!-syoE&#u}-;t!=g3_t3#*N0F{dO<+nHLGY5PI+%unfz}vB zU;pvhRU-2u;q8~_Sqbf^{QAqYtL#{LQR3Hav$V7o^5#ZUC54I5+?t2UxOU>DhALd^ zm{c{Gelk6V$&$&k1;x@%VsbvcsAW2P)g7+Z>jJA{)Qi8W^XnGsgd2y8U7T%Ng2zs7Syuw;pt$kz;=;uM)l;OLl42F5 zff@rj%qWvukAl1^8+;ubKR0c)O~;NT@CR_X+Zw^)x>bex0|-n(RRec)$)b^lMkd&8 ze4`W1dQrU2fDijy8XQ_MJ?4%rH4mNifi@b8U>Y40$+e8pHVmEUUE?6PHQdAd75+FH ze@!0w1iXyU*7*hXcJmp{gF+jkRp6nGqb%2hJu{PX<)28vZL;j(%h?tCt@hg0!UQgL zJ300C-Obbl$x)JeYNC@T2?icbG~8a|_+0z?s=De?Zbtv8ylT~_W(y*(X|pjVL%t%Q z-=8RuXJu|*TY?wnv&x-Xx2Be>(6pN^T1Z_`GpPuqX^&X-e<;+N!mKI8TJxT~w}Qf| z9R*`xTp!1TS5s&;g;i5XHHA}CC^dyqy8#qFOkE4NdY*i!_0>Fm@l9WG(-+(H)jRoA7lXcZm+o7wKBy{7T@4GM zpIdLHzi`LoSKftBxBsav_wAVH(eN8v8xjH_n_I|x%#ByKU;&psmac+&2&HRO@Cwzy((UbxFuts@vdE4)@ zGr0N?Yr3NEur9L~U0_+ew(V}ZM)$xsFn(|DC-^Pg3s1p&FrYX6KyW@Rf_LBxDBXwa z4`0JE+|PPW=oz8sf$nqNuet}f!X)ky-7{Of3;O+vRbExI;t?-p#bPg2uP}AR`{x?% zukpTnxXtZym1%5^qt@@~H7=$ZBH9F_V@((h+q4*GeZq$8rKrlSzq(OL@}^|AK@F*j z>|utTO4H-jqg_u;Zi!V7rANt3B~ zc$QIwP5cF&$FzVV={iEa*Hu>)&A#fQ+7r)3tPvIg?W%f-RU`Fo+|YY~-!+16R#kKZ z1u86qALYOP$PBDeQ>$`AeyNq-VRG@j5$yH6!PvJK?`^|77!zYcy%*jfS#6}sKtBYh zTwkK`dPvO6zdf`X)g$7fd1}JzEKUw%a8KTQq2A1{c^T6 zQ7yd4H{3;prDvp?A6|nCQ5`YA>K%w{SY6wb8G0r+#ecz=XLNuJXNSYbI9?0T6#u0u z{)-7%WuIf-Bk8{&{tGvR8Fl3S--WS9bmXONTV2|6lkfdsVdfk9pT17|eBJfa%iQ*w zb+`SlbJCBk>YV&w#vc996`!&UXY4~hyZ%Jc&4BT(& z9kMa;U$*xfS)R#Ty~BW4J7p>ZZArF$S=^gBdl=nG)^pw{&9e0WTC?utBjl|&aKJ(CJa^!bL)@}5*PV#p2p^F2zF#$Spb1se|ekQBO|2rTXiQs52VFUs5HTMqgB&ivQA?rn^rUw%+?>8~60La`$DO zongk~X-r-Vo=#p$hohW~c6_vSY6ku^d>fIdRZd2Z!;q(1dBI)on)N^Kn9+g3e^WE2 z`Fp}ZpV7(T(OW0ieA_bvza4LeP)2QXjBPlB_)l%@nX0hehW+BUbr9R&9e&R(X$%ff(@_*wnFRX*n^-y91O!iUOyw?a2Nx} zLn&xnvb=!)1uLNv-i6la1o8$N3d3OpXbkcw7zf8e95fdB4!9Hk0uO<_hStD3&{*UR zpz+Av>FMbYhk!haj(}5P7MuhZnBt+}k3;syAj@0nZji@PGZdCyun(ZZ7!Rf?$T-XejWd=<(~aQKGoZ22%i$&XKaij6o3I+b z0iLu@CdkXHIkbR|&{yrvW#D_6jbg0qRFJosKdyT%^R0L=_JZEf7Y=~_a1a~^ z@<=-YP6XdG?J?$Ggf@)%?f~*q>jQ^_#)MA=`Ts9~i$P<<<-ztOYyjWC_ao*%gKmr| z>j5rk4EX@iIP%eO3j7M>^>#7b2KT~4@OM}P@`h{1*zzEp2*r@@6_?NH;%Yf{KQgL_ zv25pbif}90-^$N<5-9C|gw%VD@jphIZzADpd3)}D{oY;wIO)#B ze`|{Wx${v?o8o_FoUMCxXMCxf;(zL{&eOkbOuG{QQ^o1)ZOu%4?S?$U-{+~~ed7&f zmuu%w(u;kM@C9T`AC{i$>$W%XRK6LO!DAqu^d@)$R>3-Gj&3*%Ccz@mXPY-eH}pN} zgz`1M~rIeQ5h}_#Dzdu_!36aVorr}m;>tJc?_O~H$bgvSLg}7KrQP8Q0qDkPJjqJ0?XhrcoO~wFN0d# z$#60hfLh;Q!Xmg5K87z~6MO^Nw7PAe9drb>%6TvYil7+EAq8iGTI)q{4?GS}z{~I| ztb+Y$wFiP)@hGSjzaE}~=RmzKtKnb8C(muz!0>G!$F#cA}>yWFx(1vz@4xZI-zlNhruukj)Ifm zZTJ{m>g`V;0qPNX7ER=zpk9LrC_c?P$U_4e29LsX&;jkECk%(9Ap`BBJrqF_UW0d_ z8CpmVoDF(wuY^yb7rNy3eayDy9o@8S=g(i0=XaCmxBpJ|ol07uCd>c#V|#3hyP$Xs z|I<^`-KWd{y;=VEML!cQoVJ;5Gc~74^2cQPZ!+^c{&)eI`P-rtYx2$f>iBpbUV{%n zU7GuH;~fU$K_>nf{0wdYnfRB&8=$UFh3-0p7sn~!cZ15LABWRm5vWV_FK{BG^ejYvppg`~{m<imkLFxkxHHwxl9tODamX)>EWxr4{W( zQW3Ky6*XJS6**f{kzkas2-=d0qOE*I(w0<&7)eFb)^bIPX@OK!?H1&hB3mI9Jx0qF zXorWJi#X+_|cR1|JWMdFrJG;T>n{et+YJrB^CW!QW3x<)%Pf=hzwd^Q5lq0WClq^XOL8c21!L}(0buM fURvJQ%2$*INkwXqRI~=kbBqj{s0~Wr(C7aF7gA*! literal 0 HcmV?d00001 diff --git a/Installation/README b/Installation/README new file mode 100755 index 00000000..4a575ba9 --- /dev/null +++ b/Installation/README @@ -0,0 +1,30 @@ + + + ================================================= + Procédure d'installation d'EFICAS + ================================================= + +Pré-requis : +------------ + + - Python 2.1 ou supérieur avec Tkinter + - PMW 8.0.5 ou supérieur + +Installation : +-------------- + +1°) copiez le fichier eficas.tar.gz dans un répertoire temporaire + +2°) Décompressez ce fichier comme suit : + + gunzip eficas.tar.gz + tar xvf eficas.tar + +3°) Vous devriez désormais voir 4 éléments : + + - 1 fichier README_install + - 1 fichier install.py + - 1 fichier code_aster.gif + - 1 répertoire /Eficas + +4°) Reportez-vous au fichier README_install pour la suite des actions à entreprendre. diff --git a/Installation/README_install b/Installation/README_install new file mode 100755 index 00000000..081d9428 --- /dev/null +++ b/Installation/README_install @@ -0,0 +1,40 @@ + + + ================================================= + Procédure d'installation d'EFICAS + ================================================= + +Pour lancer la procédure d'installation, tapez : + + python install.py + +Vous pouvez remplacer 'python' par le chemin d'accès de votre interpréteur Python. + +La procédure d'installation commence par vérifier que votre système contient bien les +pré-requis pour EFICAS (cf README) + +La procédure va vous demander un certain nombre de chemins d'accès nécessaires à l'établissement du +fichier de configuration d'EFICAS qui s'appelle editeur.ini et qui se trouvera, une fois EFICAS, +installé, dans le répertoire Eficas/Aster + +- Répertoire d'installation : répertoire dans lequel vous voulez installer Eficas +- Répertoire de travail : répertoire de travail temporaire d'EFICAS +- Répertoire matériaux : répertoire dans lequel se trouvent les catalogues matériaux d'ASTER +- Répertoire doc Aster : répertoire dans lequel se trouve le manuel U4 de la doc Aster (format pdf) + ex : /logiciels/aster/NEW6/doc/pdf/u4 +- Exécutable Acrobat Reader : chemin d'accès complet à l'exécutable Acrobat Reader + + +Catalogues Aster : EFICAS installe par défaut le catalogue Aster v6 qui se trouve en + Eficas/Aster/Cata. + Si vous voulez en installer d'autres, il faut qu'ils se trouvent dans ce même répertoire + ou qu'il y ait un lien dans ce répertoire vers le fichier. + Pour ajouter d'autres catalogues, il faut aller modifier directement le fichier editeur.ini + + + +Lancement d'EFICAS : le fichier à lancer est Eficas/Aster/eficas_aster.py + il faut le lancer précédé du chemin d'accès à l'interpréteur Python comme + pour la procédure d'installation. + + diff --git a/Installation/install.py b/Installation/install.py new file mode 100755 index 00000000..dbe14e34 --- /dev/null +++ b/Installation/install.py @@ -0,0 +1,949 @@ +SUCCES,ECHEC = 1,0 +OUI,NON = 1,0 + +## constantes pour les tests de versions + +python_min = 20 +tcl_min = 83 +tk_min = 83 +pmw_min = 85 +test = 0 + +try: + import sys,string,re,types,traceback + import os,commands +except Exception,e: + print "Mauvaise installation de Python" + print str(e) + +REPERTOIRE = os.path.abspath(os.curdir) + +def strip_points(chaine): + """ + Enlève les caractères autres que les chiffres des chaînes + """ + x="" + for i in range(len(chaine)): + try: + dummy = float(chaine[i]) + x=x+chaine[i] + except: + pass + return x + +class Test_Environnement : + def __init__(self): + self.l_errors = [] + + def test_plate_forme(self): + """ + Teste que la plate-forme est bien supportée + """ + if os.name not in ('nt','posix'): + self.l_errors.append("La plate-forme %s n'est pas supportée" %os.name) + + def test_version_python(self): + """ + Test de la version de python + """ + version = sys.version + n = string.index(version,"(") - 1 + vpyt = strip_points(version[0:n])[0:2] ## recupere les 2 premiers caracteres + if int(vpyt) self.max: + value = self.max + if value < self.min: + value = self.min + # Preserve the new value + c=self.canvas + # Adjust the rectangle + if self.orientation == "horizontal": + c.coords(self.scale,0, 0,float(value) / self.max * self.width, self.height) + else: + c.coords(self.scale,0, self.height - (float(value) / self.max*self.height),self.width, self.height) + # Now update the colors + c.itemconfig(self.scale, fill=self.fillColor) + c.itemconfig(self.label, fill=self.labelColor) + # And update the label + if self.autoLabel=="true": + c.itemconfig(self.label, text=self.labelFormat % value) + else: + c.itemconfig(self.label, text=self.labelFormat % self.labelText) + c.update_idletasks() +try : + import Tkinter + import Pmw + from tkMessageBox import showinfo,askyesno,showerror,askretrycancel +except: + pass + +class SplashScreen(Tkinter.Toplevel): + """ Provides a splash screen. Usage: + Subclass and override 'CreateWidgets()' + In constructor of main window/application call + - S = SplashScreen(main=self) (if caller is Toplevel) + - S = SplashScreen(main=self.master) (if caller is Frame) + - S.quit() after you are done creating your widgets etc. + """ + def __init__(self, master,**args): + Tkinter.Toplevel.__init__(self, master, relief='groove',borderwidth=5) + self.protocol("WM_DELETE_WINDOW",lambda x=0: x+x ) # pour ne pas détruire la fenêtre en pleine copie de fichiers + self.main = master + if self.main != None : + self.main.withdraw() + self.frame = Tkinter.Frame(self) + self.frame.pack(expand=1,fill='both') + self.init(args) + self.geometry("300x200") + self.resizable(0,0) + self.CreateWidgets() + + def init(self,args={}): + self.text = Tkinter.StringVar() + self.text.set('') + self.icone = 'Editeur/icons/logo_edf.gif' + self.barre = 'non' + if args == {} : return + if args.has_key('text'): + self.text.set(args['text']) + if args.has_key('titre'): + self.title(args['titre']) + if args.has_key('code'): + self.code = args['code'] + else: + self.code = 'inconnu' + if self.code == 'ASTER' : + self.icone = 'Editeur/icons/code_aster.gif' + + def CreateWidgets(self): + fic_image = os.path.join("./", self.icone) + if os.path.exists(fic_image): + self.catIcon = Tkinter.PhotoImage(file=os.path.join("./", self.icone)) + Tkinter.Label(self.frame, image=self.catIcon).pack(side=Tkinter.TOP) + else: + Tkinter.Label(self.frame, text = "EFICAS pour Code_Aster").pack(side=Tkinter.TOP) + self.label = Tkinter.Label(self.frame, textvariable=self.text) + self.label.pack(side=Tkinter.TOP,expand=1,fill='both') + self.progress = Slider(self.frame,value=0,max=100,orientation='horizontal', + fillColor='blue',width=200,height=30, + background='white',labelColor='red') + + def update_barre(self,event=None): + """ Permet de faire avancer la barre de progression """ + try: + self.progress.value = self.progress.value+self.increment + self.progress.update() + #self.after(100,self.update_barre) + except: + pass + + def configure_barre(self): + """ Calcule l'incrément de progression de la barre en fonction + du nombre d'opérations à effectuer afin que le compteur + soit à 100% à la fin des opérations""" + self.increment = 100./self.ratio + self.progress.update() + + def configure(self,**args): + if args.has_key('text'): + self.text.set(args['text']) + if args.has_key('titre'): + self.title(args['titre']) + if args.has_key('barre'): + old = self.barre + self.barre = args['barre'] + if self.barre == 'oui' and old == 'non': + self.progress.frame.pack(in_=self.frame,side='top') + elif self.barre == 'non' and old == 'oui': + self.progress.frame.pack_forget() + if args.has_key('ratio'): + self.ratio = args['ratio'] + self.configure_barre() + self.update() + + def quit(self): + self.progress = None + self.withdraw() + self.main.update() + self.main.deiconify() + +def centerwindow(window,parent = 'avec'): + if parent =='avec': + parent = window.winfo_parent() + if type(parent) == types.StringType: + try: + parent = window._nametowidget(parent) + except: + parent = window + # Find size of window. + window.update_idletasks() + width = window.winfo_width() + height = window.winfo_height() + if width == 1 and height == 1: + # If the window has not yet been displayed, its size is + # reported as 1x1, so use requested size. + width = window.winfo_reqwidth() + height = window.winfo_reqheight() + # Place in centre of screen: + if parent =='avec' : + x = (window.winfo_screenwidth() - width) / 2 - parent.winfo_vrootx() + y = (window.winfo_screenheight() - height) / 3 - parent.winfo_vrooty() + else: + x = (window.winfo_screenwidth() - width) / 2 + y = (window.winfo_screenheight() - height) / 3 + if x < 0: + x = 0 + if y < 0: + y = 0 + window.geometry('+%d+%d' % (x, y)) + +class config_item: + """ + Classe utilisée pour représenter chaque option de configuration + """ + def __init__(self, pere, nom): + self.nom = nom + self.pere = pere + self.entree_value = None + self.default = None + self.test = None + self.pere.register_item(self) + + def get_valeur(self): + return os.path.abspath(self.entree.get()) + + def set_entree(self,entree): + self.entree = entree + self.pere.register_entree(entree) + +class Config(Tkinter.Toplevel): + """ + Classe principale : une instance de Config est utilisée pour + créer l'interface. Toutes les actions (création de répertoire, copie + de fichiers ...) sont réalisées par des méthodes de Config ou de ses + composants + """ + pat_rep = re.compile(r'^(rep_)([\w_]*)') # expression réguliere pour reconnaitre les + # les options qui désignent des répertoires + def __init__(self, parent): + self.master = parent + Tkinter.Toplevel.__init__(self,None) + parent.withdraw() + self.title("Installation d'EFICAS") + self.geometry("500x320+0+0") + centerwindow(self) + self.install_running = 0 + #évite que la fenêtre puisse être détruite en pleine copie de fichiers + self.protocol("WM_DELETE_WINDOW",self.exit ) + # création des frames + self.frame_gen = Tkinter.Frame(self,bd=1,relief='groove') + self.frame_gen.place(relx=0,rely=0,relwidth=1,relheight=0.9 ) + self.frame_but = Tkinter.Frame(self,bd=1,relief='groove') + self.frame_but.place(relx=0,rely=0.9 ,relheight=0.1 ,relwidth=1) + # création des items de configuration + self.make_items_config() + # remplissage de la frame générale + self.make_frame_gen() + # remplissage de la frame boutons + self.make_frame_but() + # création boîtes de dialogue + self.init_complementaire() + # init système + self.init_systeme() + + def make_items_config(self): + """ + Création des objets Config_item + """ + self.items = [] + self.items_a_creer = [] + self.liste_rep_crees = [] + self.entrees = [] + # designation, texte d'invite , option par defaut(unix), option par defaut(windows), flag obligatoire/facultatif + self.l_tx_items = (('rep_install' , + "Répertoire d'installation :", + '', + '', + 'o'), + ('rep_travail' , + 'Répertoire de travail :', + 'tmp', + 'tmp', + 'f'), + ('rep_mat' , + 'Répertoire matériaux :', + None, + None, + 'f'), + ('rep_docaster' , + "Chemin d'accès à la doc Aster :" , + None, + None, + 'f' + ), + ('acrobat' , + 'Exécutable Acrobat Reader :', + '/usr/bin/acroread', + 'acrobat.exe', + 'o') + ) + + for item in self.l_tx_items: + nom_item = item[0] + setattr(self,nom_item,config_item(self,nom_item)) + + def make_frame_gen(self): + """ + Création des zones de saisie des paramètres généraux + """ + # Création du label titre de la frame + self.information = Tkinter.Label(self.frame_gen,text="CONFIGURATION D'EFICAS") + self.information.pack(side="top",pady=10) + # création des widgets de saisie des items + for txt in self.l_tx_items: + nom_item = txt[0] + txt_item = txt[1] + if os.name == 'nt': + default_value = txt[3] + else: + default_value = txt[2] + item = getattr(self,nom_item) + wdg_item = Pmw.EntryField(self.frame_gen, + labelpos = 'w', + label_text = txt_item, + command = lambda s=self,i=item : s.select_next_entry(i.entree)) + item.default_value = default_value + item.statut = txt[4] + item.set_entree(wdg_item) + # on affiche les entrées + for entree in self.entrees: + entree.pack(fill='x', expand=1, padx=10, pady=5) + Pmw.alignlabels(self.entrees) + self.entrees[0].focus_set() + #self.rep_cata_dev.entree.configure(entry_state = 'disabled') + self.display_defaults() + + def make_frame_but(self): + """ + Création des boutons de commande Installer et Annuler + """ + self.validButton = Tkinter.Button(self.frame_but, text = 'Installer', command = self.run_install) + self.exitButton = Tkinter.Button(self.frame_but, + text = 'Annuler', + command = lambda s=self : s.exit(annule='oui')) + self.exitButton.place(relx=0.35,rely=0.5,anchor='center') + self.validButton.place(relx=0.65,rely=0.5,anchor='center') + + def init_complementaire(self): + """ + Création de widgets complémentaires (boîtes de dialogue ...) + """ + self.erreur_dialog = Pmw.Dialog(self, + buttons = ('Modifier', 'Annuler'), + defaultbutton = 'Modifier', + title = 'Erreur', + command = self.erreur_exec) + self.erreur_dialog.withdraw() + self.fatale_dialog = Pmw.Dialog(self, + buttons = ('Annuler',), + title = 'Fatal', + command = self.fatale_exec) + self.fatale_dialog.withdraw() + self.info_dialog = Pmw.Dialog(self, + buttons = ('Ok',), + title = 'Attention') + self.info_dialog.configure(command=self.info_dialog.withdraw()) + self.info_dialog.withdraw() + self.attente = SplashScreen(None,code="ASTER") + self.attente.withdraw() + + def init_systeme(self): + """ + Détermine les commandes à exécuter en fonction de l'OS + """ + self.d_commandes = {} + if os.name == 'nt': + self.d_commandes['decompress'] = "unzip.exe " + self.d_commandes['copy'] = "copy " + self.d_commandes['delete'] = "del " + elif os.name == 'posix': + self.d_commandes['decompress'] = "gunzip " + self.d_commandes['copy'] = "cp " + self.d_commandes['delete'] = "rm " + + def run_install(self): + """ + Lance l'installation proprement dite d'EFICAS + """ + self.install_running = 1 + self.afficher_splash() + self.deactivate_entries() # Les entrees et les boutons sont desactivees + self.deactivate_buttons() # pendant les operations d'installation + #self.decompress_archive() + #if not os.path.exists(os.path.join(REPERTOIRE,'Eficas')): + # self.afficher_fatale("Il manque des fichiers d'EFICAS") + # self.install_running = 0 + # return + self.nb_fichiers = self.compte_fichiers(REPERTOIRE) + if self.nb_fichiers == 0: + self.afficher_fatale("Il manque des fichiers d'EFICAS") + self.install_running = 0 + return + # essaie de creer les repertoires. + try: + if self.make_dirs() == ECHEC : + self.activate_entries() + self.activate_buttons() + self.install_running = 0 + return + except: + self.install_running = 0 + self.afficher_fatale("Impossible de créer certains répertoires") + + # affiche la fenêtre avec la barre de progression + self.afficher_copie_fichiers() + # essaie de copier les fichiers d'EFICAS + try: + if self.move_files() == ECHEC: + self.afficher_echec("Impossible de copier les fichiers d'EFICAS") + self.activate_buttons() + self.install_running = 0 + return + except : + traceback.print_exc() + self.install_running = 0 + self.afficher_fatale("Impossible de copier certains fichiers") + + #self.rm_temp_dirs() # efface les répertoires temporaires + try: + self.creer_fic_conf() # crée le fichier eficas.conf + except: + afficher_info("Impossible de créer le fichier de configuration\n Il est possible de le faire a la main") +# self.install_running = 0 + self.afficher_install_terminee() # A ce stade tout est fait et il ne reste plus qu'à attendre + # un clic de souris pour sortir + + def display_defaults(self): + """ + Affiche les valeurs par défaut dans les zones de saisie + """ + # racine indique la racine de l'arborescence + if os.name == 'nt': + racine = 'C:\\' + else: + racine = os.environ['HOME'] + # remplit les zones de saisie avec les options par défaut + for item in self.items: + if item.default_value == None : continue + item.default_value = os.path.join(racine,item.default_value) + item.entree.insert(0,item.default_value) + + def register_item(self,item): + """ + Enregistre l'item dans la liste des items et éventuellement + dans la liste des items à créer (répertoires) + """ + self.items.append(item) + if self.pat_rep.match(item.nom) : + self.items_a_creer.append(item) + + def register_entree(self,entree): + """ + Enregistre la zone de saisie dans la liste des zones + """ + self.entrees.append(entree) + + def select_next_entry(self,entree): + """ + Place le focus dans l'entry suivant celle passée en argument + """ + index = self.entrees.index(entree)+1 + if index != len(self.entrees): + self.entrees[index].component('entry').focus() + + def activate_entries(self): + """ + Active les entrées. Les zones de saisie deviennent éditables. + """ + for item in self.entrees: + item.configure(entry_state='normal') + + def deactivate_entries(self): + """ + Désactive les entrées. Les zones ne sont plus éditables. + """ + for item in self.entrees: # Les entrees sont desactivees + item.configure(entry_state='disabled') # pendant les operations d'installation + + def activate_buttons(self): + """ + active les boutons valider et annuler + """ + self.validButton.configure(state = 'normal') + self.exitButton.configure(state = 'normal') + + def deactivate_buttons(self): + """ + désactive des boutons valider de annuler + """ + self.validButton.configure(state = 'disabled') + self.exitButton.configure(state = 'disabled') + + def erreur_exec(self, result): + """ + Callback exécuté lorsque l'utilisateur clique sur un des boutons + Modifier/Annuler de la fenêtre de dialogue qui lui présente les erreurs + """ + self.erreur_dialog.deactivate(result) + self.removedir() + if result == 'Annuler': + self.install_running = 0 + self.exit(annule='non') + + def fatale_exec(self, result): + """ + Callback exécuté lorsque l'utilisateur clique sur le bouton + Quitter de la fenêtre de dialogue qui lui présente les erreurs fatales + Seule solution : sortir de l'installation + """ + self.fatale_dialog.deactivate(result) + self.install_running = 0 + self.exit(annule='oui') + + def test_confirmation(self,flag,nom): + """ + Callback activé par le clic sur bouton fenêtre demandant confirmation + avant création répertoire facultatif + """ + if flag == 'NON': + self.confirmation.destroy() + self.TEST_confirmation_avant_creation = NON + return + else : + self.confirmation.destroy() + self.TEST_confirmation_avant_creation = OUI + + def afficher_fatale(self, message): + """ + Affiche les erreurs fatales + """ + self.attente.withdraw() + w = Tkinter.Label(self.fatale_dialog.interior(),text = message, pady = 5) + w.pack(expand = 1, fill = 'both', padx = 4, pady = 4) + self.fatale_dialog.configure(deactivatecommand = w.destroy) + self.fatale_dialog.activate() + + def afficher_echec(self, message): + """ + Affiche un message d'erreur + Par construction, dès que l'on passe par cette méthode, on sort de l'installation + en passant le flag install_running à 0 + """ + self.attente.withdraw() + w = Tkinter.Label(self.erreur_dialog.interior(),text = message, pady = 5) + w.pack(expand = 1, fill = 'both', padx = 4, pady = 4) + self.erreur_dialog.configure(deactivatecommand = w.destroy) + self.erreur_dialog.activate() + + def confirmation_avant_creation(self,repertoire): + """ + Affiche une boite de dialogue pour confirmer la création + d'un répertoire facultatif. + """ + self.attente.withdraw() + self.confirmation = Pmw.Dialog(self, + buttons = ('OUI', 'NON'), + defaultbutton = 'OUI', + title = "Répertoire inexistant", + command = lambda f,s=self,r=repertoire : s.test_confirmation(f,r)) + self.confirmation.withdraw() + Tkinter.Label(self.confirmation.interior(), + text="Le répertoire %s n'existe pas \n Voulez-vous le créer ?" %repertoire).pack(side='top') + self.confirmation.activate(geometry='centerscreenalways') + return self.TEST_confirmation_avant_creation + + def afficher_splash(self): + """ + Afficher la boite de message + """ + self.attente.deiconify() + self.attente.tkraise() + centerwindow(self.attente) + self.attente.configure(titre="Installation d'EFICAS", + text="Vérification intégrité sources Eficas", + barre="non") + + def afficher_info(self,message): + """ + Afficher une boite de warning + """ + w = Tkinter.Label(self.info_dialog.interior(),text = message, pady = 5) + w.pack(expand = 1, fill = 'both', padx = 4, pady = 4) + self.info_dialog.configure(deactivatecommand = w.destroy) + self.info_dialog.activate() + + def afficher_copie_fichiers(self): + """ + Afficher la boite de message avec la barre de progression + """ + self.attente.deiconify() + self.attente.tkraise() + self.attente.configure(titre="Installation d'EFICAS", + text="copie des fichiers", + barre="oui") + self.attente.ratio = self.nb_fichiers + self.attente.configure_barre() + + def afficher_install_terminee(self): + """ + Afficher le message Installation terminée + """ + self.withdraw() + self.attente.configure(titre="Installation d'EFICAS", + text="Installation terminée", + barre="non") + self.exitButton.place_forget() + self.validButton.place_forget() + self.validButton = Tkinter.Button(self.attente.frame, + text = 'Quitter', + command = self.exit) + self.validButton.pack(side='top',pady=5) + self.install_running = 0 + + def decompress_archive(self) : + """ + Décompresse l'archive d'EFICAS dans un répertoire temporaire (.) + """ + print "decompress_archive" + #try: + commande = os.path.join(REPERTOIRE,self.d_commandes['decompress']) + fichier = os.path.join(REPERTOIRE,"eficas.zip") + print 'commande =',commande + print 'fichier =',fichier + os.execv(commande,("eficas.zip",)) + #except: + # self.affiche_echec("Erreur dans la décompression") + + def normaliser_chemin(self, nom): + """ + Retourne le chemin d'accès complet à nom + """ + return os.path.abspath(os.path.expanduser(nom)) + + def discriminer_noms(self): + """ + Emet un message d'alerte si des zones de saisie ne sont pas remplies + ou si des noms de répertoires à créer sont identiques. + """ + liste_noms = [] + for item in self.items_a_creer: + nom = item.entree.get() + if nom == self.rep_install.entree.get(): # il faut ajouter 'Eficas' au chemin du repertoire + nom = os.path.join(nom,"Eficas") # d'installation + liste_noms.append(nom) + + test = SUCCES + for item in self.items_a_creer: + nom = item.entree.get() + if len(nom) == 0 : + test = ECHEC + message = "attention : certains répertoires n'ont pas de nom" + self.afficher_echec(message) + item.entree.component('entry').focus() + break + + if test == ECHEC : + return test + + for item in self.items_a_creer: + nom = item.entree.get() + if liste_noms.count(nom) >1 : + test = ECHEC + message = "attention : certains répertoires ont le même nom" + self.afficher_echec(message) + item.entree.component('entry').focus() + break + + return test + + def compte_fichiers(self,path): + """ + Dénombre les fichiers présents dans le répertoire Eficas (et ses sous-répertoires) + """ + nb = 0 + l_fic = os.listdir(path) + l_rep = [] + for fic in l_fic : + if os.path.isdir(os.path.join(path,fic)): + l_rep.append(fic) + else: + nb = nb+1 + for rep in l_rep : + nb = nb + self.compte_fichiers(os.path.join(path,rep)) + return nb + + def creer_fic_conf(self): + """ + Crée le fichier editeur.ini a partir des données saisies + par l'administrateur. + """ + fichier_conf = os.path.join(self.normaliser_chemin(self.rep_install.get_valeur()),"Eficas/Aster/editeur.ini") + f = open(fichier_conf,'w') + f.write("path_doc = "+'"'+self.normaliser_chemin(self.rep_docaster.get_valeur())+'"\n') + f.write("exec_acrobat = "+'"'+self.normaliser_chemin(self.acrobat.get_valeur())+'"\n') + f.write('isdeveloppeur = "NON"\n') + f.write("rep_travail = "+'"'+self.normaliser_chemin(self.rep_travail.get_valeur())+'"\n') + f.write("rep_cata = "+'"'+os.path.join(self.normaliser_chemin(self.rep_install.get_valeur()),"Eficas/Aster/Cata/")+'"\n') # attention au dernier slash + f.write("rep_mat = "+'"'+self.normaliser_chemin(self.rep_mat.get_valeur())+'"\n') + cata = """catalogues = (('ASTER','v6',rep_cata + 'cata_STA6.py','python','defaut'),)\n""" + f.write(cata) + f.close() + + + def move_files(self): + """ + Déplace les fichiers Eficas du répertoire temporaire vers + leur répertoire de destination + """ + # création du répertoire Eficas + rep_eficas = os.path.join(self.rep_install.get_valeur(),'Eficas') + self.copy_rep(REPERTOIRE,rep_eficas) + + def copy_rep(self,rep_dep,rep_arr): + """ + Copie le répertoire path_dep et ses sous-répertoires dans path_arr + """ + l_fichiers = os.listdir(rep_dep) + if not os.path.exists(rep_arr) : + # création du répertoire d'arrivée quand il n'existe pas + self.mkdirs(rep_arr) + for fic in l_fichiers : + nom_complet_dep = os.path.join(rep_dep,fic) + nom_complet_arr = os.path.join(rep_arr,fic) + if os.path.isfile(nom_complet_dep): + commande_copie = self.d_commandes['copy']+nom_complet_dep+' '+nom_complet_arr + commande_delete= self.d_commandes['delete']+nom_complet_dep + try: + os.system(commande_copie) + #os.system(commande_delete) + self.attente.update_barre() + except Exception,e: + pass + elif os.path.isdir(nom_complet_dep): + self.copy_rep(nom_complet_dep,nom_complet_arr) + + def rm_temp_dirs(self): + """ + Détruit le répertoire temporaire de l'archive d'Eficas + """ + rep_arch = os.path.join(REPERTOIRE,'Eficas') + self.rm_r(rep_arch) + + def make_dirs(self): + """ + Crée les répertoires d'accueil des fichiers d'EFICAS + """ + # création des répertoires dont l'utilisateur a donné le nom + if self.discriminer_noms() == ECHEC: + return ECHEC + for item in self.items_a_creer: + if not item.entree.get(): + continue + nom = item.get_valeur() + if nom == self.normaliser_chemin(self.rep_install.entree.get()): # il faut ajouter 'Eficas' au chemin du repertoire + nom = os.path.join(nom,"Eficas") # d'installation + item.test = self.essai_creer(nom,item.statut) + if item.test == ECHEC : + item.entree.component('entry').focus() + return ECHEC + return SUCCES + + def essai_creer(self, nom, statut): + """ + Essaie de créer le répertoire nom s'il n'existe pas déjà. + Si statut == 'f' et si le fichier n'existe pas, demande + confirmation avant création + """ + repertoire = self.normaliser_chemin(nom) # repertoire = chemin absolu de nom + if os.path.exists(repertoire): + if statut == 'o' : + self.afficher_echec("Un fichier ou répertoire de nom "+ repertoire+ " existe déjà !\n"+ + "L'installation ne peut continuer") + return ECHEC + else: + return SUCCES + + if statut == 'f' : + # on demande confirmation de création à l'utilisateur + test = self.confirmation_avant_creation(repertoire) + if test == NON: + return SUCCES + + try: + test = self.mkdirs(repertoire) + return SUCCES + except Exception,e: + message = "La création de "+repertoire+" a échoué :\n %s \n Vérifiez vos droits d'écriture" %str(e) # message d'erreur + self.afficher_echec(message) + return ECHEC + + def mkdirs(self,rep): + """ + Création récursive des répertoires d'installation. + Les noms des répertoires crées sont stockés dans + une liste dont se sert la méthode removedir pour + restaurer l'environnement initial en cas d'annulation. + """ + if rep==os.path.dirname(rep): + return SUCCES + + if os.path.exists(os.path.dirname(rep)): + os.mkdir(rep) + self.liste_rep_crees.append(rep) + return SUCCES + else: + test = self.mkdirs(os.path.dirname(rep)) + if test == SUCCES: + os.mkdir(rep) + self.liste_rep_crees.append(rep) + return SUCCES + else: + return ECHEC + + def rm_r(self,path): + """ + Detruit récursivement path + """ + if not os.path.exists(path): + return + try: + if len(os.listdir(path))!=0: + for entree in os.listdir(path): + entree = os.path.join(path,entree) + self.rm_r(entree) + os.rmdir(path) + except Exception,e: + self.afficher_info("Impossible de détruire le répertoire : "+path+"\n"+"\n"+str(e)+"\n L'installation continue néanmoins") + + def removedir(self): + """ + Destruction des répertoires déja crées (en cas d'annulation) + """ + for rep in self.liste_rep_crees: + self.rm_r(rep) + self.liste_rep_crees = [] + + def exit(self,annule='non'): + """ + Tente de sortir de l'application. + Echoue si installation en cours + """ + if self.install_running : + # l'installation est en cours --> on interdit la sortie + self.afficher_info("Impossible de quitter tant que l'installation est en cours\n Veuillez patienter") + else: + if annule == 'oui' : self.removedir() + self.master.quit() + +if __name__ == '__main__': + test = Test_Environnement().test() + if not test : + # environnement incomplet --> on sort de la procédure d'installation + sys.exit() + else: + import Tkinter + import Pmw + root = Tkinter.Tk() + Pmw.initialise(root) + try: + principal = Config(root) + root.mainloop() + except Exception,e: + print "Erreur non prévue rencontrée : ",str(e) + print "Veuillez prévenir la maintenance" + sys.exit() diff --git a/Minicode/cata_saturne.py b/Minicode/cata_saturne.py index 40975a2d..4c742a6a 100755 --- a/Minicode/cata_saturne.py +++ b/Minicode/cata_saturne.py @@ -3,6 +3,8 @@ import Accas from Accas import * +#CONTEXT.debug=1 + import ops JdC = JDC_CATA(code='SATURNE', @@ -11,13 +13,21 @@ JdC = JDC_CATA(code='SATURNE', AU_MOINS_UN('FIN'), A_CLASSER(('DEBUT','POURSUITE'),'FIN') ) - ); + ) # P. RASCLE MMN # remarques diverses sur le catalogue Saturne # - dans les blocs, il faut au moins un mot clé de statut obligatoire # probleme de rafraichissement des blocs dépendants quand la valeur d'un mot cle global (ITURB) passe de 1 à 0 +# Type le plus general +class entier (ASSD):pass +class reel (ASSD):pass +class complexe(ASSD):pass +class liste (ASSD):pass +class chaine (ASSD):pass + + class sonde(ASSD):pass class varsca(ASSD):pass class flusca(ASSD):pass @@ -36,7 +46,35 @@ class tsr23(ASSD):pass class resti(ASSD):pass class maillage(ASSD):pass -class listr8 (ASSD):pass +class modele(ASSD):pass +class matr_asse(ASSD):pass +class cham_elem_sief_r(ASSD):pass +class theta_geom(ASSD):pass +class cham_mater(ASSD):pass +class cara_elem(ASSD):pass +class char_ther(ASSD):pass +class char_meca(ASSD):pass +class nume_ddl(ASSD):pass +class char_acou(ASSD):pass +class listr8 (ASSD):pass +class matr_elem(ASSD):pass +class matr_elem_depl_c(matr_elem):pass +class matr_elem_depl_r(matr_elem):pass +class matr_elem_pres_c(matr_elem):pass +class matr_elem_temp_r(matr_elem):pass + +# matr_asse : +#-------------------------------- +class matr_asse(ASSD):pass +class matr_asse_depl_c(matr_asse):pass +class matr_asse_depl_r(matr_asse):pass +class matr_asse_gene_r(matr_asse):pass +class matr_asse_gene_c(matr_asse):pass +class matr_asse_pres_c(matr_asse):pass +class matr_asse_pres_r(matr_asse):pass +class matr_asse_temp_c(matr_asse):pass +class matr_asse_temp_r(matr_asse):pass + # fin entete @@ -101,6 +139,33 @@ FORMULE = FORM( nom='FORMULE',op=-5,sd_prod=fonction, COMPLEXE = SIMP(typ = 'shell',max=1), ) ; +AFFE_MODELE=OPER(nom="AFFE_MODELE",op=18,sd_prod=modele,docu="U4.41.01-f1", + fr="Affectation des éléments finis sur le maillage",reentrant='n', + MAILLAGE =SIMP(statut='o',typ=(maillage) ), + INFO =SIMP(statut='f',typ='I',defaut=1,into=(1,2) ), + VERIF =SIMP(statut='f',typ='TXM',max=2,into=("MAILLE","NOEUD") ), + ); +NUME_DDL=OPER(nom="NUME_DDL",op=11,sd_prod=nume_ddl,docu="U4.61.11-f",reentrant='n', + fr="Etablissement de la numérotation des ddl avec ou sans renumérotation et du stockage de la matrice", + MATR_RIGI =SIMP(statut='f',typ=(matr_elem_depl_r ,matr_elem_depl_c, + matr_elem_temp_r,matr_elem_pres_c),max=100 ), + MODELE =SIMP(statut='f',typ=modele ), + b_modele =BLOC(condition = "MODELE != None", + CHARGE =SIMP(statut='f',max='**',typ=(char_meca,char_ther,char_acou, ),), + ), + METHODE =SIMP(statut='f',typ='TXM',defaut="MULT_FRONT",into=("MULT_FRONT","LDLT","GCPC") ), + b_mult_front =BLOC(condition="METHODE=='MULT_FRONT'",fr="paramètres associés à la méthode multifrontale", + RENUM =SIMP(statut='f',typ='TXM',into=("MD","MDA","METIS"),defaut="METIS" ), + ), + b_ldlt =BLOC(condition="METHODE=='LDLT'",fr="paramètres associés à la méthode LDLT", + RENUM =SIMP(statut='f',typ='TXM',into=("RCMK","SANS"),defaut="RCMK" ), + ), + b_gcpc =BLOC(condition="METHODE=='GCPC'",fr="paramètres associés à la méthode gradient conjugué", + RENUM =SIMP(statut='f',typ='TXM',into=("RCMK","SANS"),defaut="RCMK" ), + ), + INFO =SIMP(statut='f',typ='I',into=(1,2)), +) ; + DEFI_SONDE = OPER(nom="DEFI_SONDE",op= 1,sd_prod=sonde, docu="U2D1", fr="définition d'une sonde historique avec ses coordonnées", @@ -1229,3 +1294,258 @@ FIN=PROC(nom="FIN",op=9999,repetable='n',fr="Fin d'une ) ; +def macro_matr_asse_ops(self,MODELE,CHAM_MATER,CARA_ELEM,MATR_ASSE, + SOLVEUR,NUME_DDL,CHARGE,INST,**args): + """ + Ecriture de la macro MACRO_MATR_ASSE + """ + ier=0 + # On met le mot cle NUME_DDL dans une variable locale pour le proteger + numeddl=NUME_DDL + # On importe les definitions des commandes a utiliser dans la macro + # Le nom de la variable doit etre obligatoirement le nom de la commande + CALC_MATR_ELEM=self.get_cmd('CALC_MATR_ELEM') + NUME_DDL =self.get_cmd('NUME_DDL') + ASSE_MATRICE =self.get_cmd('ASSE_MATRICE') + # La macro compte pour 1 dans la numerotation des commandes + self.icmd=1 + + if SOLVEUR: + methode=SOLVEUR['METHODE'] + if methode=='LDLT': + if SOLVEUR['RENUM']: + renum=SOLVEUR['RENUM'] + else: + renum='RCMK' + if renum not in ('SANS','RCMK'): + ier=ier+1 + self.cr.fatal("Avec methode LDLT, RENUM doit etre SANS ou RCMK.") + return ier + elif methode=='MULT_FRONT': + if SOLVEUR['RENUM']: + renum=SOLVEUR['RENUM'] + else: + renum='MDA' + if renum not in ('MDA','MD','METIS'): + ier=ier+1 + self.cr.fatal("Avec methode MULT_FRONT, RENUM doit etre MDA, MD ou RCMK.") + return ier + elif methode=='GCPC': + if SOLVEUR['RENUM']: + renum=SOLVEUR['RENUM'] + else: + renum='SANS' + if renum not in ('SANS','RCMK'): + ier=ier+1 + self.cr.fatal("Avec methode GCPC, RENUM doit etre SANS ou RCMK.") + return ier + else: + methode='MULT_FRONT' + renum ='MDA' + + if numeddl in self.sdprods: + # Si le concept numeddl est dans self.sdprods + # il doit etre produit par la macro + # il faudra donc appeler la commande NUME_DDL + lnume = 1 + else: + lnume = 0 + lrigel = 0 + lmasel = 0 + + iocc=0 + for m in MATR_ASSE: + iocc=iocc+1 + option=m['OPTION'] + if iocc == 1 and lnume == 1 and option not in ('RIGI_MECA','RIGI_MECA_LAGR', + 'RIGI_THER','RIGI_ACOU') : + ier=ier+1 + self.cr.fatal("LA PREMIERE OPTION DOIT ETRE RIGI_MECA OU RIGI_THER OU RIGI_ACOU OU RIGI_MECA_LAGR") + return ier + + if m['SIEF_ELGA']!=None and option!='RIGI_GEOM': + ier=ier+1 + self.cr.fatal("SIEF_ELGA N EST ADMIS QU AVEC L OPTION RIGI_GEOM") + return ier + + if m['MODE_FOURIER']!=None and option not in ('RIGI_MECA','RIGI_FLUI_STRU','RIGI_THER'): + ier=ier+1 + self.cr.fatal("MODE_FOURIER N EST ADMIS QU AVEC UNE DES OPTIONS RIGI_MECA RIGI_FLUI_STRU RIGI_THER") + return ier + + if (m['THETA']!=None or m['PROPAGATION']!=None) and option!='RIGI_MECA_LAGR': + ier=ier+1 + self.cr.fatal("PROPAGATION ET,OU THETA NE SONT ADMIS QU AVEC L OPTION RIGI_MECA_LAGR") + return ier + motscles={'OPTION':option} + if option == 'AMOR_MECA': + if (not lrigel or not lmasel): + ier=ier+1 + self.cr.fatal("""POUR CALCULER AMOR_MECA, IL FAUT AVOIR CALCULE + RIGI_MECA ET MASS_MECA AUPARAVANT (DANS LE MEME APPEL)""") + return ier + if CHAM_MATER != None: + motscles['RIGI_MECA'] =rigel + motscles['MASS_MECA'] =masel + if CHARGE != None: + if option[0:9] not in ('MASS_THER','RIGI_GEOM','MASS_ID_M'): + motscles['CHARGE'] =CHARGE + if CHAM_MATER != None: motscles['CHAM_MATER'] =CHAM_MATER + if CARA_ELEM != None: motscles['CARA_ELEM'] =CARA_ELEM + if INST != None: motscles['INST'] =INST + if m['SIEF_ELGA'] : motscles['SIEF_ELGA'] =m['SIEF_ELGA'] + if m['MODE_FOURIER']: motscles['MODE_FOURIER']=m['MODE_FOURIER'] + if m['THETA'] : motscles['THETA'] =m['THETA'] + if m['PROPAGATION'] : motscles['PROPAGATION'] =m['PROPAGATION'] + __a=CALC_MATR_ELEM(MODELE=MODELE,**motscles) + + if option == 'RIGI_MECA': + rigel = __a + lrigel = 1 + if option == 'MASS_MECA': + masel = __a + lmasel = 1 + + if lnume and option in ('RIGI_MECA','RIGI_THER','RIGI_ACOU','RIGI_MECA_LAGR'): + self.DeclareOut('num',numeddl) + # On peut passer des mots cles egaux a None. Ils sont ignores + num=NUME_DDL(MATR_RIGI=__a,METHODE=methode,RENUM=renum) + else: + num=numeddl + + self.DeclareOut('mm',m['MATRICE']) + mm=ASSE_MATRICE(MATR_ELEM=__a,NUME_DDL=num) + return ier + +def macro_matr_asse_prod(self,NUME_DDL,MATR_ASSE,**args): + if not MATR_ASSE: raise AsException("Impossible de typer les concepts resultats") + if not NUME_DDL: raise AsException("Impossible de typer les concepts resultats") + self.type_sdprod(NUME_DDL,nume_ddl) + for m in MATR_ASSE: + opti=m['OPTION'] + + if opti in ( "RIGI_MECA","RIGI_FLUI_STRU","RIGI_MECA_LAGR" , + "MASS_MECA" , "MASS_FLUI_STRU" ,"RIGI_GEOM" ,"RIGI_ROTA", + "AMOR_MECA","IMPE_MECA","MASS_ID_MDEP_R","MASS_ID_MDNS_R", + "ONDE_FLUI","MASS_MECA_DIAG" ) : t=matr_asse_depl_r + + if opti in ( "RIGI_ACOU","MASS_ACOU","AMOR_ACOU",) : t=matr_asse_pres_c + + if opti in ( "RIGI_THER","MASS_THER","RIGI_THER_CONV" , + "RIGI_THER_CONV_D","MASS_ID_MTEM_R","MASS_ID_MTNS_R",) : t=matr_asse_temp_r + + if opti == "RIGI_MECA_HYST" : t= matr_asse_depl_c + + self.type_sdprod(m['MATRICE'],t) + return None + +MACRO_MATR_ASSE=MACRO(nom="MACRO_MATR_ASSE",op=macro_matr_asse_ops,docu="U4.61.21-c", + sd_prod=macro_matr_asse_prod, + fr="Calcul des matrices assemblées (matr_asse_gd) par exemple de rigidité, de masse ", + MODELE =SIMP(statut='o',typ=modele), + CHAM_MATER =SIMP(statut='f',typ=cham_mater), + CARA_ELEM =SIMP(statut='f',typ=cara_elem), + CHARGE =SIMP(statut='f',typ=(char_meca,char_ther,char_acou)), + INST =SIMP(statut='f',typ='R'), + NUME_DDL =SIMP(statut='o',typ=(nume_ddl,CO)), + SOLVEUR =FACT(statut='d',min=01,max=01, + METHODE =SIMP(statut='f',typ='TXM',defaut="MULT_FRONT", + into=("LDLT","MULT_FRONT","GCPC")), + RENUM =SIMP(statut='f',typ='TXM',into=("SANS","RCMK","MD","MDA","METIS")), + ), + MATR_ASSE =FACT(statut='o',min=01,max='**', + MATRICE =SIMP(statut='o',typ=(matr_asse,CO)), + OPTION =SIMP(statut='o',typ='TXM', + into=("RIGI_MECA","MASS_MECA","MASS_MECA_DIAG", + "AMOR_MECA","RIGI_MECA_HYST","IMPE_MECA", + "ONDE_FLUI","RIGI_FLUI_STRU","MASS_FLUI_STRU", + "RIGI_ROTA","RIGI_GEOM","RIGI_MECA_LAGR", + "RIGI_THER","MASS_THER", + "RIGI_ACOU","MASS_ACOU","AMOR_ACOU", + "MASS_ID_MTEM_R","MASS_ID_MTNS_R","MASS_ID_MDEP_R","MASS_ID_MDNS_R",) + ), + SIEF_ELGA =SIMP(statut='f',typ=cham_elem_sief_r), + MODE_FOURIER =SIMP(statut='f',typ='I'), + THETA =SIMP(statut='f',typ=theta_geom), + PROPAGATION =SIMP(statut='f',typ='R'), + ), + TITRE =SIMP(statut='f',typ='TXM',max='**'), + INFO =SIMP(statut='f',typ='I',defaut=1,into=(1,2)), +) ; + + +def defi_valeur_prod(self,IS=None,R8=None,TX=None,C8=None,LS=None): + if IS != None : return entier + if R8 != None : return reel + if TX != None : return chaine + if C8 != None : return complexe + if LS != None : return liste + raise AsException("type de concept resultat non prevu") + +DEFI_VALEUR=MACRO(nom="DEFI_VALEUR",op=-4,sd_prod=defi_valeur_prod, + fr="Affectation d une valeur à une variable Superviseur", + docu="U4.31.04-e1",reentrant='f', + regles=(UN_PARMI('IS','R8','TX','C8','LS'),), + IS =SIMP(statut='f',typ='I',max='**'), + R8 =SIMP(statut='f',typ='R',max='**'), + TX =SIMP(statut='f',typ='TXM',max='**'), + C8 =SIMP(statut='f',typ='C',max='**'), + LS =SIMP(statut='f',typ='L',max='**'), +) ; + +def macro2_prod(self,MODELE,**args): + return maillage + +MACRO2 =MACRO(nom="MACRO2",op= -5 ,docu="U4.61.21-c", + sd_prod=macro2_prod, + fr="Calcul des matrices assemblées (matr_asse_gd) par exemple de rigidité, de masse ", + MODELE =SIMP(statut='o',typ=modele), +); + +class concept(ASSD):pass + +def op1_prod(x,**args): + if x == 0:return concept + if x == 1:return concept + raise AsException("type de concept resultat non prevu") + +OP1 = OPER(nom='OP1',op=1,sd_prod=op1_prod,reentrant='f', + a=SIMP(statut='o',typ='I',into=(0,1,2)), + b=SIMP(typ=concept), + ccc=FACT(statut='d',d=SIMP(typ='I'),e=SIMP(typ='I')), + b_1=BLOC(condition="a==0", + x=SIMP(statut='o',typ='I',into=(0,1)), + c=FACT(d=SIMP(typ='I'),e=SIMP(typ='I')), + ), + b_2=BLOC(condition="a==1", + x=SIMP(statut='o',typ='I',into=(0,1)), + b_2=BLOC(condition="1", + cc=FACT(d=SIMP(typ='I'),e=SIMP(typ='I')), + c=FACT(d=SIMP(typ='I'),e=SIMP(typ='I')), + ), + ), + ); + + +def op2_prod(self,x,**args): + if x == 0:return concept + if x == 1:return concept + raise AsException("type de concept resultat non prevu") + +OP2 = MACRO(nom='OP2',op=1,sd_prod=op2_prod,reentrant='f', + a=SIMP(statut='o',typ='I',into=(0,1,2)), + b=SIMP(typ=concept), + ccc=FACT(statut='d',d=SIMP(typ='I'),e=SIMP(typ='I')), + b_1=BLOC(condition="a==0", + x=SIMP(statut='o',typ='I',into=(0,1)), + c=FACT(d=SIMP(typ='I'),e=SIMP(typ='I')), + ), + b_2=BLOC(condition="a==1", + x=SIMP(statut='o',typ='I',into=(0,1)), + b_2=BLOC(condition="1", + cc=FACT(d=SIMP(typ='I'),e=SIMP(typ='I')), + c=FACT(d=SIMP(typ='I'),e=SIMP(typ='I')), + ), + ), + ); + diff --git a/Minicode/eficas_mini.py b/Minicode/eficas_mini.py index c8a97ac1..281ccc8e 100755 --- a/Minicode/eficas_mini.py +++ b/Minicode/eficas_mini.py @@ -3,19 +3,44 @@ Ce module sert à lancer EFICAS configuré pour Code_Mini """ # Modules Python -import sys +import sys,os # Modules Eficas import prefs sys.path[:0]=[prefs.INSTALLDIR] +args=sys.argv[1:] +for a in args: + if a == "-display": + os.environ['DISPLAY']=args[args.index("-display")+1] + import Editeur from Editeur import eficas_go -if len(sys.argv) > 1 : - # on veut ouvrir un fichier directement au lancement d'Eficas - eficas_go.lance_eficas(code='SATURNE',fichier = sys.argv[1]) +def main(): + if len(sys.argv) > 1 : + # on veut ouvrir un fichier directement au lancement d'Eficas + eficas_go.lance_eficas(code='SATURNE',fichier = sys.argv[1]) + else: + # on veut ouvrir Eficas 'vide' + eficas_go.lance_eficas(code='SATURNE') + +def hidez(): + from Misc import Cyclops + z = Cyclops.CycleFinder() + z.run(main) + z.find_cycles() + z.show_stats() + z.show_cycles() + # z.show_cycleobjs() + # z.show_sccs() + z.show_arcs() + +withCyclops=0 + +if withCyclops: + hidez() else: - # on veut ouvrir Eficas 'vide' - eficas_go.lance_eficas(code='SATURNE') + main() + diff --git a/Minicode/prefs.py b/Minicode/prefs.py index f3d82ae8..aa3f6929 100644 --- a/Minicode/prefs.py +++ b/Minicode/prefs.py @@ -14,6 +14,7 @@ INSTALLDIR=os.path.join(REPINI,'..') # Peut valoir None (defaut) CODE_PATH = None #CODE_PATH = os.path.join(REPINI,'../../Superv') +CODE_PATH = "/home01/chris/projet_Eficas/Devel/SUPER6_3/Aster6_3/bibpyt" # ICONDIR sert à localiser le répertoire contenant les icones # Par défaut on utilise le répertoire icons dans Editeur diff --git a/Tools/__init__.py b/Tools/__init__.py index 0366cee6..c060d833 100644 --- a/Tools/__init__.py +++ b/Tools/__init__.py @@ -1,8 +1,20 @@ -#@ MODIF __init__ Tools DATE 15/02/2001 AUTEUR YESSAYAN A.YESSAYAN # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== __all__=['foztools'] diff --git a/Validation/V_ETAPE.py b/Validation/V_ETAPE.py index 1152f81f..a5105d37 100644 --- a/Validation/V_ETAPE.py +++ b/Validation/V_ETAPE.py @@ -7,7 +7,7 @@ utilisée par héritage multiple pour composer les traitements. """ # Modules Python -import string,types +import string,types,sys import traceback # Modules EFICAS @@ -118,7 +118,11 @@ class ETAPE(V_MCCOMPO.MCCOMPO): # Erreur pendant le calcul du type retourné if CONTEXT.debug:traceback.print_exc() self.sd=None - if cr == 'oui' : self.cr.fatal('Impossible d affecter un type au résultat') + if cr == 'oui' : + l=traceback.format_exception(sys.exc_info()[0], + sys.exc_info()[1], + sys.exc_info()[2]) + self.cr.fatal('Impossible d affecter un type au résultat\n'+ string.join(l[2:])) return 0 # on teste maintenant si la SD est r\351utilis\351e ou s'il faut la cr\351er if self.reuse: diff --git a/Validation/V_MACRO_ETAPE.py b/Validation/V_MACRO_ETAPE.py index b0531a12..f4ce1892 100644 --- a/Validation/V_MACRO_ETAPE.py +++ b/Validation/V_MACRO_ETAPE.py @@ -7,7 +7,7 @@ utilisée par héritage multiple pour composer les traitements. """ # Modules Python -import string,types +import string,types,sys import traceback # Modules EFICAS @@ -120,7 +120,11 @@ class MACRO_ETAPE(V_ETAPE.ETAPE): # Erreur pendant le calcul du type retourné if CONTEXT.debug:traceback.print_exc() self.sd=None - if cr == 'oui' : self.cr.fatal('Impossible d affecter un type au résultat') + if cr == 'oui' : + l=traceback.format_exception(sys.exc_info()[0], + sys.exc_info()[1], + sys.exc_info()[2]) + self.cr.fatal('Impossible d affecter un type au résultat\n'+string.join(l[2:])) return 0 # on teste maintenant si la SD est r\351utilis\351e ou s'il faut la cr\351er if self.reuse: diff --git a/convert/Parserv5/Translate.py b/convert/Parserv5/Translate.py index 66ddd27c..4cab28d5 100644 --- a/convert/Parserv5/Translate.py +++ b/convert/Parserv5/Translate.py @@ -1,3 +1,23 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + #!/bin/env python -d #!/tools/net/app/Python-1.5.2/bin/python1.5 diff --git a/convert/Parserv5/__init__.py b/convert/Parserv5/__init__.py index 96e6d4d3..21ab883a 100644 --- a/convert/Parserv5/__init__.py +++ b/convert/Parserv5/__init__.py @@ -1,3 +1,23 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + try: import mx.TextTools import sys diff --git a/convert/Parserv5/conv.py b/convert/Parserv5/conv.py index 8f9621c2..4f4aba8b 100644 --- a/convert/Parserv5/conv.py +++ b/convert/Parserv5/conv.py @@ -1,17 +1,30 @@ -#@ MODIF conv Parsers DATE 17/10/2001 AUTEUR DURAND C.DURAND # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== + import sys,string import TextTools from tables import ERRORS # -__version__="$Name: V1_1p1 $" -__Id__="$Id: conv.py,v 1.1.1.1 2001/12/04 15:38:23 eficas Exp $" +__version__="$Name: $" +__Id__="$Id: conv.py,v 1.1.1.1 2002/03/26 09:08:45 eficas Exp $" # Keywords=('MAILLE_1','MAILLE_2','MAILLE_ESCL','MAILLE_FOND','MAILLE_MAIT','MAILLE_ORIG','MAILLE', diff --git a/convert/Parserv5/tables.py b/convert/Parserv5/tables.py index 513b0011..b258354d 100644 --- a/convert/Parserv5/tables.py +++ b/convert/Parserv5/tables.py @@ -1,4 +1,23 @@ -#@ MODIF tables Parsers DATE 15/02/2001 AUTEUR YESSAYAN A.YESSAYAN +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + """ Ce fichier définit une table de tags à utiliser avec le package mxTextTools pour décoder un fichier au format Asterv5. @@ -10,7 +29,7 @@ from TextTools import * # __version__="$Name: $" -__Id__="$Id: tables.tag,v 1.11.18.1 2001/06/15 17:20:24 iliade Exp $" +__Id__="$Id: tables.tag,v 1.1.1.1 2002/03/26 09:08:45 eficas Exp $" # err0='ERR0 , erreur non identifiee : ' @@ -24,9 +43,10 @@ err7='ERR7 , mot cle facteur errone : ' err8='ERR8 , signe = ou ( attendu : ' err9='ERR9 , ( attendue : ' err10='ERR10 , vexpr attendue : ' +err11='ERR11 , ) attendue : ' ERRORS=(err0,err1,err2,err3,err4,err5,err6,err7,err8,err9, - err10) + err10,err11) white_set=set(whitespace) @@ -170,6 +190,16 @@ t_complexe = \ (err7,Table,t_err,MatchFail,MatchOk), )) +# Table pour identifier le keyword PI + +t_PI = \ + ('PI',Table,( + (None,Word,'PI',MatchFail), + (None,IsIn,alpha+'_'+number,MatchOk,+1), + (None,Skip,-1), + (None,Jump,To,MatchFail), + )) + t_vexpr = ( ('par',Is,'(',+5,+1), commespaces + (+1,), @@ -181,7 +211,7 @@ t_vexpr = ( ('sign',IsIn,'+-',+3,+1), commespaces + (+1,), ('vexpr',Table,ThisTable,+19,+10), - ("PI",Word,'PI',+1,+9), + t_PI + (+1,+9), t_ident + (MatchFail,), commespaces + (+1,), ('listpar',Is,'(',+6,+1), # on peut avoir une liste de parametres @@ -307,9 +337,9 @@ t_formule = \ commespaces + (+1,), ('vexpr',Table,t_vexpr,+9), commespaces + (+1,), - (None,Is,')',+8), + (None,Is,')',+9), commespaces + (+1,), - (None,Is,')',+6), + (None,Is,')',+7), commespaces + (+1,), (None,Is,';',+3), (None,AllNotIn,'\n',+1), @@ -318,6 +348,8 @@ t_formule = \ (err0,Table,t_err,MatchFail,MatchOk), # (err9,Table,t_err,MatchFail,MatchOk), + # + (err11,Table,t_err,MatchFail,MatchOk), )) t_nom_ope = \ diff --git a/convert/Parserv5/tables.tag b/convert/Parserv5/tables.tag index 2a28f072..309dd497 100755 --- a/convert/Parserv5/tables.tag +++ b/convert/Parserv5/tables.tag @@ -1,4 +1,23 @@ -#@ MODIF tables Parsers DATE 15/02/2001 AUTEUR YESSAYAN A.YESSAYAN +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== + """ Ce fichier définit une table de tags à utiliser avec le package mxTextTools pour décoder un fichier au format Asterv5. @@ -10,7 +29,7 @@ from TextTools import * # __version__="$Name: $" -__Id__="$Id: tables.tag,v 1.11.18.1 2001/06/15 17:20:24 iliade Exp $" +__Id__="$Id: tables.tag,v 1.1.1.1 2002/03/26 09:08:45 eficas Exp $" # err0='ERR0 , erreur non identifiee : ' @@ -24,9 +43,10 @@ err7='ERR7 , mot cle facteur errone : ' err8='ERR8 , signe = ou ( attendu : ' err9='ERR9 , ( attendue : ' err10='ERR10 , vexpr attendue : ' +err11='ERR11 , ) attendue : ' ERRORS=(err0,err1,err2,err3,err4,err5,err6,err7,err8,err9, - err10) + err10,err11) white_set=set(whitespace) @@ -158,6 +178,15 @@ t_complexe is: err7 = Table t_err F:MatchFail T:MatchOk +# Table pour identifier le keyword PI + +t_PI is: + 'PI' = Table is: + Word 'PI' F:MatchFail + IsIn alpha+'_'+number F:MatchOk T:next + Skip back + Jump To MatchFail + t_vexpr = Table is: 'par' = Is '(': commespaces F:next @@ -169,7 +198,7 @@ t_vexpr = Table is: 'sign' = IsIn '+-': commespaces F:next 'vexpr' = Table ThisTable F: T: - "PI" = Word 'PI' F:next T: + t_PI F:next T: t_ident F:MatchFail commespaces F:next 'listpar' = Is '(': # on peut avoir une liste de parametres @@ -287,9 +316,9 @@ t_formule is: commespaces F:next 'vexpr' = Table t_vexpr F: commespaces F:next - Is ')' F: + Is ')' F: commespaces F:next - Is ')' F: + Is ')' F: commespaces F:next Is ';' F: AllNotIn '\n' F:next @@ -298,6 +327,8 @@ t_formule is: err0 = Table t_err F:MatchFail T:MatchOk err9 = Table t_err F:MatchFail T:MatchOk + + err11 = Table t_err F:MatchFail T:MatchOk t_nom_ope is: 'nom_ope' = Table is: diff --git a/convert/__init__.py b/convert/__init__.py index c6d52220..e731b26d 100644 --- a/convert/__init__.py +++ b/convert/__init__.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce package contient tous les convertisseurs de formats d'entrée en objets compréhensibles par EFICAS. diff --git a/convert/convert_asterv5.py b/convert/convert_asterv5.py index 780626d8..e025eec2 100644 --- a/convert/convert_asterv5.py +++ b/convert/convert_asterv5.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient le plugin convertisseur de fichier au format asterv5 pour EFICAS. diff --git a/convert/convert_ini.py b/convert/convert_ini.py index aa32a725..811bc6a5 100644 --- a/convert/convert_ini.py +++ b/convert/convert_ini.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient le plugin convertisseur de fichier au format ini pour EFICAS. diff --git a/convert/convert_pyth.py b/convert/convert_pyth.py index 30f3b28a..b408ff21 100644 --- a/convert/convert_pyth.py +++ b/convert/convert_pyth.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient le plugin convertisseur de fichier au format python pour EFICAS. diff --git a/convert/convert_python.py b/convert/convert_python.py index a5a69cb2..cfe54a6a 100644 --- a/convert/convert_python.py +++ b/convert/convert_python.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient le plugin convertisseur de fichier au format python pour EFICAS. diff --git a/convert/parseur_python.py b/convert/parseur_python.py index b999b6ba..b5a45897 100644 --- a/convert/parseur_python.py +++ b/convert/parseur_python.py @@ -1,9 +1,21 @@ -#@ MODIF parseur_python Parsers DATE 05/09/2001 AUTEUR DURAND C.DURAND # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== import sys,string,re diff --git a/generator/Formatage.py b/generator/Formatage.py index d54d464c..aaa531a5 100644 --- a/generator/Formatage.py +++ b/generator/Formatage.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient la classe Formatage qui permet le formatage d'une liste de chaines de caractères dans une syntaxe représentative d'un diff --git a/generator/__init__.py b/generator/__init__.py index 89d4cb40..39110152 100644 --- a/generator/__init__.py +++ b/generator/__init__.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce package contient tous les générateurs de formats de sortie à partir des objets d' EFICAS. diff --git a/generator/generator_aplat.py b/generator/generator_aplat.py index c12b6dac..25c3265f 100644 --- a/generator/generator_aplat.py +++ b/generator/generator_aplat.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient le plugin generateur de fichier au format aplat pour EFICAS. @@ -268,7 +287,7 @@ class AplatGenerator: text = '' init = self.init + self.sep + obj.nom old_init=self.init - for data in self.data : + for data in obj.data : i=i+1 self.init = init + self.sep + "occurrence n°"+`i` text = text + self.generator(data) @@ -283,7 +302,7 @@ class AplatGenerator: if type(obj.valeur) in (types.TupleType,types.ListType) : # On est en présence d'une liste de valeur rep = '(' - for val in self.valeur: + for val in obj.valeur: if type(val) == types.InstanceType : rep = rep + self.generator(val) +',' else: diff --git a/generator/generator_asterv5.py b/generator/generator_asterv5.py index fa3b9499..d634158a 100644 --- a/generator/generator_asterv5.py +++ b/generator/generator_asterv5.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient le plugin generateur de fichier au format asterv5 pour EFICAS. diff --git a/generator/generator_ini.py b/generator/generator_ini.py index 64b5bfd8..2e2ac93b 100644 --- a/generator/generator_ini.py +++ b/generator/generator_ini.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient le plugin generateur de fichier au format ini pour EFICAS. diff --git a/generator/generator_pyth.py b/generator/generator_pyth.py index 6d911224..34fa5cf7 100644 --- a/generator/generator_pyth.py +++ b/generator/generator_pyth.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient le plugin generateur de fichier au format pyth pour EFICAS. diff --git a/generator/generator_python.py b/generator/generator_python.py index 6220c818..87c55ca5 100644 --- a/generator/generator_python.py +++ b/generator/generator_python.py @@ -1,3 +1,22 @@ +# CONFIGURATION MANAGEMENT OF EDF VERSION +# ====================================================================== +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM 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 +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# +# ====================================================================== """ Ce module contient le plugin generateur de fichier au format python pour EFICAS. @@ -453,6 +472,8 @@ class PythonGenerator: if hasattr(obj.etape,'sdprods'): if val in obj.etape.sdprods : s = s + "CO('"+ self.generator(val) +"')" + elif val.__class__.__name__ == 'CO': + s = s + "CO('"+ self.generator(val) +"')" else: s = s + self.generator(val) elif isinstance(val,PARAMETRE): @@ -472,6 +493,8 @@ class PythonGenerator: if hasattr(obj.etape,'sdprods'): if val in obj.etape.sdprods : s = "CO('"+ self.generator(val) +"')" + elif val.__class__.__name__ == 'CO': + s = "CO('"+ self.generator(val) +"')" else: s = self.generator(val) elif isinstance(val,PARAMETRE): -- 2.39.2