--- /dev/null
+import os
+import aide_objets
+import aide_gui
+
+def go(fichier=None,master=None):
+ if not fichier :
+ fichier=os.path.join(os.path.dirname(__file__),"index_aide.py")
+ index = aide_objets.INDEX(fichier)
+ index.build()
+ o = aide_gui.AIDE_GUI(index,master=master)
+ o.build()
+ return o
--- /dev/null
+"""
+Ce module génère l'IHM permettant d'accéder à l'aide en ligne d'une application(ex: EFICAS)
+Il analyse l'objet index passé en argument et génére automatiquement en conséquence le menu
+avec liens hyper texte
+"""
+
+from Tkinter import *
+
+class AIDE_GUI:
+ """
+ Classe définissant l'IHM de l'appli d'aide
+ """
+ def __init__(self,objet,master=None):
+ self.objet = objet
+ self.master = master
+ self.init()
+ self.init_window()
+ self.init_frames()
+ self.init_buttons()
+ self.init_text()
+
+ def init(self):
+ """
+ Initialise les structures de données utlisées par l'objet
+ """
+ self.padx = [0,0,0,0]
+ self.padx[0] = 0
+ self.padx[1] = 30
+ self.padx[2] = 50
+ self.historique = []
+
+ def init_window(self):
+ """
+ Initialise la fenêtre mère de l'appli
+ """
+ fenetre = Toplevel()
+ if self.master :
+ self.fenetre = fenetre
+ else:
+ self.fenetre = fenetre.master
+ fenetre.destroy()
+ self.fenetre.title(self.objet.titre)
+ self.fenetre.geometry("700x700+50+50")
+ self.fenetre.resizable(1,1)
+ #self.fenetre.minsize(600,800)
+ #self.fenetre.maxsize(900,800)
+ self.fenetre.protocol("WM_DELETE_WINDOW",self.quit)
+ self.fenetre.update()
+
+ def init_frames(self):
+ """
+ Initialise les frames principales de l'appli
+ """
+ self.frame1 = Frame(self.fenetre,relief='flat',bd=2)
+ self.frame2 = Frame(self.fenetre,relief='flat',bd=2)
+ self.frame1.grid(row=0,column=0,sticky='news')
+ self.frame2.grid(row=1,column=0,sticky='news')
+ self.fenetre.grid_columnconfigure(0,weight=1,minsize=0)
+ self.fenetre.grid_rowconfigure(1,minsize=30)
+ self.fenetre.grid_rowconfigure(0,weight=1,minsize=0)
+
+ def init_buttons(self):
+ """
+ Crée les boutons dans le bas de la fenêtre
+ """
+ self.b_retour = Button(self.frame2,text = "Précédent",command=self.go_back)
+ self.b_retour.place(relx=0.33,rely=0.5,anchor='center')
+ Button(self.frame2,text="Fermer",command=self.quit).place(relx=0.66,rely=0.5,anchor='center')
+
+
+ def init_text(self):
+ """
+ Construit le widget Text qui accueillera l'index et les fichiers
+ """
+ self.scroll_v = Scrollbar(self.frame1)
+ self.scroll_v.grid(row=0,column=1,rowspan=2,sticky='nesw')
+ self.scroll_h = Scrollbar(self.frame1,orient='horizontal')
+ self.scroll_h.grid(row=1,column=0,rowspan=2,sticky='nesw')
+ self.canvas = Canvas(self.frame1,
+ bg='white',
+ relief='sunken',
+ scrollregion=(0,0,1000,1000),
+ yscrollcommand=self.scroll_v.set,
+ xscrollcommand=self.scroll_h.set)
+ self.canvas.grid(row=0,column=0,sticky='nesw')
+ self.scroll_v.configure(command=self.canvas.yview)
+ self.scroll_h.configure(command=self.canvas.xview)
+ self.frame1.grid_columnconfigure(0,weight=1,minsize=0)
+ self.frame1.grid_rowconfigure(0,weight=1,minsize=0)
+ self.frame1.grid_rowconfigure(1,minsize=10)
+ self.frame1.grid_columnconfigure(1,minsize=10)
+
+ def build(self):
+ """
+ Lance la construction dynamique de l'index en hyper texte
+ """
+ self.frame1.update_idletasks()
+ largeur = self.frame1.winfo_width()
+ self.canvas.create_rectangle(0,0,1,1,outline='white')
+ self.y_courant = 0
+ # Construction du titre encadré d'une bordure
+ titre = self.canvas.create_text(int(largeur/2),50,anchor='center',text=self.objet.titre,font="Helvetica 12 bold")
+ bbox = self.canvas.bbox(titre)
+ bordure = self.canvas.create_rectangle(bbox[0]-5,bbox[1]-5,bbox[2]+5,bbox[3]+5,
+ outline = 'black',
+ fill = 'grey75')
+ self.canvas.lower(bordure)
+ self.y_courant += 100
+ # Construction des items
+ for item in self.objet.l_items :
+ self.build_item(item,0)
+ # Affichage du texte dans le fichier associé (s'il existe)
+ if self.objet.fichier :
+ try:
+ texte=open(self.objet.fichier,'r').read()
+ except:
+ texte="Fichier %s inaccessible" % self.objet.fichier
+ self.canvas.create_text(10,self.y_courant+20,
+ text=texte,
+ anchor='nw')
+ # Configuration dynamique des boutons
+ self.config_boutons()
+ #
+ self.canvas.config(scrollregion=self.canvas.bbox('all'))
+
+ def config_boutons(self):
+ """
+ Activation du bouton précédent s'il y a lieu
+ """
+ if self.historique :
+ self.b_retour.config(state='normal')
+ else :
+ self.b_retour.config(state='disabled')
+
+ def build_item(self,item,padx):
+ """
+ Affiche l'item dans le menu décalé de padx
+ """
+ l = Label(self.canvas,
+ text=item.titre,
+ foreground = 'blue',
+ background='white',
+ font="Helvetica 12 bold")
+ l.bind("<Button-1>",lambda e,s=self,o=item : s.update_objet(o))
+ l.bind("<Enter>",lambda e,s=self,o=l : s.select_label(o))
+ l.bind("<Leave>",lambda e,s=self,o=l : s.deselect_label(o))
+ self.canvas.create_window(self.padx[padx],self.y_courant,window=l,anchor='w')
+ self.y_courant += 20
+ for sub_item in item.l_items :
+ self.build_item(sub_item,padx+1)
+
+ def show_file(self,fichier):
+ """
+ Affiche le fichier passé en argument
+ """
+ print "on veut afficher :",fichier
+
+ def select_label(self,label):
+ """
+ Callback invoqué lorsque le label passé en argument est sélectionné
+ """
+ label.config(fg='white',bg='blue')
+
+ def deselect_label(self,label):
+ """
+ Callback invoqué lorsque le label passé en argument est sélectionné
+ """
+ label.config(bg='white',fg='blue')
+
+ def go_back(self):
+ """
+ Affiche l'item précédent
+ """
+ self.update_objet(self.historique[-1])
+ self.historique = self.historique[0:-1]
+ # Configuration dynamique des boutons
+ self.config_boutons()
+
+ def update_objet(self,new_objet):
+ """
+ Cette méthode remplace l'objet courant par new_objet.
+ Elle vide le widget text et affiche le nouvel objet
+ """
+ if not self.historique :
+ self.historique.append(self.objet)
+ elif new_objet is not self.historique[-1] :
+ self.historique.append(self.objet)
+ self.objet = new_objet
+ self.canvas.delete('all')
+ self.build()
+
+ def quit(self):
+ """
+ Ferme l'appli Aide
+ """
+ self.fenetre.destroy()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null
+"""
+Ce module génère un objet INDEX par lecture et interprétation du fichier texte
+le décrivant (ex : index_aide.py)
+"""
+
+import os
+
+class ITEM_INDEX :
+ """
+ Construit un objet ITEM_INDEX
+ """
+ def __init__(self,t_item):
+ self.t_item = t_item
+ self.init()
+
+ def init(self):
+ """
+ Initialise les structures de données de l'item
+ """
+ self.titre = ""
+ self.fichier = ""
+ self.l_items = []
+
+ def build(self):
+ """
+ Construit les sous-items de self s'il y a lieu et retoruve le label et le fichier de l'item
+ dans le tuple
+ """
+ self.titre = self.t_item[0]
+ self.fichier = self.t_item[1]
+ l_items = self.t_item[2]
+ if l_items :
+ for item in l_items :
+ o = ITEM_INDEX(item)
+ o.build()
+ self.l_items.append(o)
+
+class INDEX :
+ """
+ Construit un objet INDEX (non graphique) à partir de l'interprétation du fichier d'index
+ (type index_aide.py) passé en argument
+ """
+ def __init__(self,fichier_index):
+ self.fichier_index = fichier_index
+ self.init()
+
+ def init(self):
+ """
+ Initialise les structures de données propres à l'index
+ """
+ self.titre = ""
+ self.fichier = None
+ self.l_items = []
+
+ def build(self):
+ """
+ Lit le fichier index et l'interprète
+ """
+ txt = open(self.fichier_index,'r').read()
+ d = {}
+ d['repertoire']=os.path.dirname(self.fichier_index)
+ #txt = "items ="+txt
+ #print txt
+ exec txt in d
+ items = d.get("items",None)
+ if items :
+ self.titre = items[0]
+ self.fichier = items[1]
+ l_items = items[2]
+ for item in l_items :
+ o = ITEM_INDEX(item)
+ o.build()
+ self.l_items.append(o)
+
+
+
--- /dev/null
+"""
+Contient la description des fichiers d'aide et leur structuration
+
+chaque panneau est un tuple de 3 éléments :
+
+- élément 1 : titre de la page
+- élément 2 : URL du fichier à afficher quand on visualise cette page d'aide ou None si aucun
+- élément 3 : tuple contenant les sous-panneaux de ce panneau (tuple de 3-tuples) ou None si aucun
+
+La variable repertoire est initialisee avec le chemin du repertoire local
+"""
+
+import os
+
+items =("Aide en ligne EFICAS",None,
+ (
+ ("FAQs",os.path.join(repertoire,"..","Editeur","faqs.txt"),None),
+ ("Install",os.path.join(repertoire,"..","INSTALL"),
+ (
+ ("Procedure d'installation",os.path.join(repertoire,"..","README_install"),None),
+ )
+ ),
+ ),
+ )
--- /dev/null
+# 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
+# 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
+# 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
+# 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
+# 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
+# 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
+# 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):
+# 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
+# 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
+# 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
+# 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
+# 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)
+# 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
+# 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
+# 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
+# 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
+# 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
+# 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
+# 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
+# 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
+# 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
+# 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
+# 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
+# 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
+# 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
+# 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
+# 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
+# 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
+# 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
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
--- /dev/null
+
+
+1- Installation standard
+
+Pour installer EFICAS a partir de la distribution : <nom_distrib>.tgz
+faire :
+ tar xzvf <nom_distrib>.tgz
+
+ce qui a pour effet de créer un répertoire de nom <nom_distrib>.
+
+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
+
+
--- /dev/null
+ ======================================================================
+ 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)
+ ======================================================================
--- /dev/null
+
+Pour installer EFICAS voir dans le fichier INSTALL
+# 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
# 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'),
)
#!/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
"""
+# 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
# 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'
+ 'Aide',
+ )
+
+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'),
+ ]
+ ),
+ ('Aide',[
+ ('Aide EFICAS','aideEFICAS'),
+ ]
+ ),
+ ]
+ }
+
--- /dev/null
+"""
+ 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('../AIDE',os.path.join(path_distrib,'AIDE'),['*.py'])
+ copyfiles('../AIDE/fichiers',os.path.join(path_distrib,'AIDE/fichiers'),['*'])
+ 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()
+
-#@ 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
+# 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
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 :
+# 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.
+#
+#
+# ======================================================================
-#@ 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
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']
+# 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
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')
+# 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
+# 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
"""
# Modules Eficas
import splash
+import prefs
import convert
import generator
+import AIDE
from jdcdisplay import JDCDISPLAY
from utils import extension,stripPath,save_in_file
from widgets import Fenetre,Ask_Format_Fichier
('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
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()
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'):
"""
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):
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
+ def aideEFICAS(self):
+ AIDE.go(master=self.parent)
-#@ 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
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
-#@ 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
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
+# 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
-#@ 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
-#@ 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
-#@ 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
-#@ 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
-#@ 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
-#@ 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):
-#@ 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
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):
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:
# 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)
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()
-#@ 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
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
-#@ 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 *
-#@ 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
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()
-#@ 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
choix = self.listbox.getcurselection()[0]
self.valeur_choisie.set(choix)
except:
- pass
+ traceback.print_exc()
+
def choose_valeur_from_list(self,command):
try:
self.valeur_choisie.set(choix)
apply(command,(),{})
except:
- pass
+ traceback.print_exc()
class EtapeTreeItem(Objecttreeitem.ObjectTreeItem):
panel = OPERPanel
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()
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
-#@ 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
-#@ 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
-#@ 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
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()
-#@ 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
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:
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
# ----------------------------------------------------------------------------------------
self.record_valeur(valeur)
if self.node.item.isvalid():
self.node.parent.select()
- # fermeture de la fenêtre de sélection\r
- if self.ajout_valeurs:\r
- self.ajout_valeurs.quit()\r
+ # 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\r
- if self.ajout_valeurs:\r
- self.ajout_valeurs.quit()\r
+ # fermeture de la fenêtre de sélection
+ if self.ajout_valeurs:
+ self.ajout_valeurs.quit()
def traite_reel(self,valeur):
"""
"""
Génère la page de saisie de plusieurs valeurs parmi un ensemble discret
de possibles
- """\r
+ """
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
# 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)\r
- # Création d'un bouton "Importer ..." sur le panel.\r
- bouton_valeurs_fichier = Button(self.frame_choix,\r
- text="Importer ...",\r
- command=self.select_in_file)\r
- bouton_valeurs_fichier.place(relx=0.28,rely=0.7,relwidth=0.6)\r
+ 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,
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
command = self.annule_modifs_valeur)
for but in (bouton_accepter,bouton_annuler):
but.pack(side='left',padx=5)
-\r
- def select_in_file(self):\r
- """ Permet d'ouvrir un fichier choisi par l'utilisateur. """\r
- nom_fichier = askopenfilename(title="Choix fichier :")\r
- if nom_fichier == "":\r
- return\r
- try:\r
- f = open(nom_fichier, "rb")\r
- selection_texte = f.read()\r
- f.close()\r
- self.ajout_valeurs = FenetreDeSelection(self, self.node.item,\r
- titre="Sélection de valeurs",\r
- texte=selection_texte)\r
- except:\r
- showinfo("Erreur de fichier","impossible d'ouvir le fichier "+nom_fichier)\r
+
+ 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):
"""
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):
"""
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 :')
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()
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':
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)
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):
self.entry.bind("<Return>",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()
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):
else:
# on attend un entier, un réel ou une string
self.panel = UNIQUE_BASE_Panel
-
def SetText(self, text):
try:
def GetMinMax(self):
""" Retourne les valeurs min et max de la définition de object """
return self.object.get_min_max()
-\r
- def GetMultiplicite(self):\r
- """ A préciser.\r
- Retourne la multiplicité des valeurs affectées à l'objet\r
- représenté par l'item. Pour le moment retourne invariablement 1.\r
- """\r
- return 1\r
-\r
- def GetType(self):\r
- """ Retourne le type de valeur attendu par l'objet représenté par l'item.\r
- """\r
- return self.object.get_type()\r
-\r
- def GetIntervalle(self):\r
- """ Retourne le domaine de valeur attendu par l'objet représenté par l'item.\r
- """\r
- return self.object.getintervalle()\r
-\r
- def IsInIntervalle(self,valeur):\r
- """ Retourne 1 si la valeur est dans l'intervalle permis par\r
- l'objet représenté par l'item.\r
- """\r
- return self.object.isinintervalle(valeur)\r
+
+ 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 """
- 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
+# 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
"""
-#@ 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
+# 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
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)
+# 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
+# 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
+# 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
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):
"""
Affichage du label dans la zone concernée
"""
txt = " Un ou plusieurs mots-clés inconnus ont été trouvés dans le fichier de commandes."
- txt = txt + "En cliquant sur leur nom, vous pourrez soit corriger l'orthographe soit supprimer ce mot-clé"
+ #txt = txt + "En cliquant sur leur nom, vous pourrez soit corriger l'orthographe soit supprimer ce mot-clé"
self.fenetre.update_idletasks()
Label(self.frame1,
text = txt,
"""
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("<Button-1>",lambda event,en=e,m=mc,s=self : s.select_mc(m,en))
- e.bind("<Return>",lambda e,s=self : s.modifie_mc())
+ #e.bind("<Button-1>",lambda event,en=e,m=mc,s=self : s.select_mc(m,en))
+ #e.bind("<Return>",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):
"""
self.b_quit = Button(self.frame3,
text = "Fermer",
command = self.quit)
- self.b_mod.place(relx=0.25,rely=0.5,anchor='center')
- self.b_sup.place(relx=0.50,rely=0.5,anchor='center')
- self.b_quit.place(relx=0.75,rely=0.5,anchor='center')
+ #self.b_mod.place(relx=0.25,rely=0.5,anchor='center')
+ #self.b_sup.place(relx=0.50,rely=0.5,anchor='center')
+ #self.b_quit.place(relx=0.75,rely=0.5,anchor='center')
+ self.b_quit.place(relx=0.50,rely=0.5,anchor='center')
def wait_new_list(self):
"""
"""
txt = ''
for o in l_o :
- print o
txt = txt + o.nom+'/'
# on enlève le dernier slash en trop
txt = txt[0:-1]
"""
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()
+# 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')
+# 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
+# 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
+# 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
self.jdc=jdc
self.nom_jdc=nom_jdc
self.fichier=None
+ self.panel_courant=None
if not appli:
class Appli:
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):
"""
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)
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 !")
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 !")
+# 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
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={}
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)
-
-
-
+# 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
-#@ 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
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
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 """
+# 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.
+# 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
+# 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
+# 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
+# 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
+# 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
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):
-#@ 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 *
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
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
try:
child.trace_ligne()
except:
+ print "Erreur dans trace_ligne :"
print child
print child.item.object
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 :
# 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)
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) """
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()
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 :
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()
+# 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
"""
-#@ 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
""" 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'),
+# 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.
+#
+#
+# ======================================================================
-#@ 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
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()
"""
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
+
+# 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
"""
return []
+ def get_sdprods(self,nom_sd):
+ """
+ Retourne les concepts produits par la commande
+ """
+ return None
+ def verif_existence_sd(self):
+ pass
+# 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
-#@ 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
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:
+# 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
+# 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
self.niveau = None
self.etape = None
self.state = 'undetermined'
+ self.actif=1
self.mc_liste=self.build_mc()
def build_mc(self):
+# 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
+# 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
"""
+# 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
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):
"""
return []
-
+ def verif_existence_sd(self):
+ pass
+# 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
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()
"""
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)
+# 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)
"""
--- /dev/null
+# 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__)
+# 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.
+#
+#
+# ======================================================================
"""
"""
+# 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') :
+# 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
"""
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) :
# 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:
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.
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
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))
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# 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.
+#
+#
+# ======================================================================
"""
"""
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
--- /dev/null
+# 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
+
+# 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
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)
+# 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
# 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
self.niveau=self
self.params=[]
self.fonctions=[]
+ self._etape_context=None
def get_cmd(self,nomcmd):
"""
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 :
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":
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:
# 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':
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
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:
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'):
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):
"""
"""
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
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
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]
+
+# 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:
+# 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 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):
"""
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
# 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))
+# 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):
+# 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
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
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):
"""
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'):
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
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()
# 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
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
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
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()
+# 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):
+# 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:
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 []
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
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):
# 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
+
+# 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
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
"""
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):
"""
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
# 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()
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)
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):
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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# 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),
"""
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
+
+# 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.
+#
+#
+# ======================================================================
"""
"""
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
+# 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.
+#
+#
+# ======================================================================
"""
"""
+# 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 ""
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))
+# 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
+# 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.
+#
+#
+# ======================================================================
"""
"""
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
+# 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
--- /dev/null
+
+
+ =================================================
+ 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.
--- /dev/null
+\r
+\r
+ =================================================\r
+ Procédure d'installation d'EFICAS \r
+ =================================================\r
+\r
+Pour lancer la procédure d'installation, tapez :\r
+\r
+ python install.py\r
+\r
+Vous pouvez remplacer 'python' par le chemin d'accès de votre interpréteur Python.\r
+\r
+La procédure d'installation commence par vérifier que votre système contient bien les\r
+pré-requis pour EFICAS (cf README)\r
+\r
+La procédure va vous demander un certain nombre de chemins d'accès nécessaires à l'établissement du\r
+fichier de configuration d'EFICAS qui s'appelle editeur.ini et qui se trouvera, une fois EFICAS,\r
+installé, dans le répertoire Eficas/Aster\r
+\r
+- Répertoire d'installation : répertoire dans lequel vous voulez installer Eficas\r
+- Répertoire de travail : répertoire de travail temporaire d'EFICAS\r
+- Répertoire matériaux : répertoire dans lequel se trouvent les catalogues matériaux d'ASTER\r
+- Répertoire doc Aster : répertoire dans lequel se trouve le manuel U4 de la doc Aster (format pdf)\r
+ ex : /logiciels/aster/NEW6/doc/pdf/u4\r
+- Exécutable Acrobat Reader : chemin d'accès complet à l'exécutable Acrobat Reader\r
+\r
+\r
+Catalogues Aster : EFICAS installe par défaut le catalogue Aster v6 qui se trouve en\r
+ Eficas/Aster/Cata.\r
+ Si vous voulez en installer d'autres, il faut qu'ils se trouvent dans ce même répertoire\r
+ ou qu'il y ait un lien dans ce répertoire vers le fichier.\r
+ Pour ajouter d'autres catalogues, il faut aller modifier directement le fichier editeur.ini\r
+\r
+ \r
+\r
+Lancement d'EFICAS : le fichier à lancer est Eficas/Aster/eficas_aster.py\r
+ il faut le lancer précédé du chemin d'accès à l'interpréteur Python comme\r
+ pour la procédure d'installation.\r
+\r
+\r
--- /dev/null
+SUCCES,ECHEC = 1,0\r
+OUI,NON = 1,0\r
+\r
+## constantes pour les tests de versions \r
+\r
+python_min = 20\r
+tcl_min = 83\r
+tk_min = 83\r
+pmw_min = 85\r
+test = 0\r
+\r
+try:\r
+ import sys,string,re,types,traceback\r
+ import os,commands\r
+except Exception,e:\r
+ print "Mauvaise installation de Python"\r
+ print str(e)\r
+\r
+REPERTOIRE = os.path.abspath(os.curdir)\r
+\r
+def strip_points(chaine):\r
+ """\r
+ Enlève les caractères autres que les chiffres des chaînes\r
+ """\r
+ x=""\r
+ for i in range(len(chaine)):\r
+ try:\r
+ dummy = float(chaine[i])\r
+ x=x+chaine[i]\r
+ except:\r
+ pass\r
+ return x\r
+\r
+class Test_Environnement :\r
+ def __init__(self):\r
+ self.l_errors = []\r
+\r
+ def test_plate_forme(self):\r
+ """\r
+ Teste que la plate-forme est bien supportée\r
+ """\r
+ if os.name not in ('nt','posix'):\r
+ self.l_errors.append("La plate-forme %s n'est pas supportée" %os.name)\r
+ \r
+ def test_version_python(self):\r
+ """\r
+ Test de la version de python\r
+ """\r
+ version = sys.version\r
+ n = string.index(version,"(") - 1\r
+ vpyt = strip_points(version[0:n])[0:2] ## recupere les 2 premiers caracteres\r
+ if int(vpyt)<python_min :\r
+ self.l_errors.append("La version %s de python n'est plus supportée" %version[0:n])\r
+\r
+ def test_tcl_tk(self):\r
+ """\r
+ Test des versions de tcl et tk\r
+ """\r
+ try:\r
+ import Tkinter\r
+ vtcl = Tkinter.tkinter.TCL_VERSION\r
+ vtk = Tkinter.tkinter.TK_VERSION\r
+ # version tcl\r
+ x = strip_points(vtcl)\r
+ if int(x)<tcl_min :\r
+ self.l_errors.append("La version %s de tcl n'est plus supportée" %vtcl)\r
+ # version tk\r
+ x = strip_points(vtk)\r
+ if int(x)<tk_min :\r
+ self.l_errors.append("La version %s de tk n'est plus supportée" %vtk)\r
+ except Exception,e:\r
+ self.l_errors.append("Tkinter n'est pas installé")\r
+ print str(e)\r
+\r
+ def test_Pmw(self):\r
+ """\r
+ Test de la version de Pmw\r
+ """\r
+ try:\r
+ import Pmw\r
+ vpmw = Pmw._version\r
+ x = strip_points(vpmw)\r
+ if int(x)<pmw_min :\r
+ self.l_errors.append("La version %s de Pmw n'est plus supportée" %vpmw)\r
+ except:\r
+ self.l_errors.append("Pmw n'est pas installé")\r
+\r
+ def test(self):\r
+ """\r
+ Active les tests de version Python, versions Tcl/Tk et Pmw\r
+ """\r
+ self.test_plate_forme()\r
+ self.test_version_python()\r
+ self.test_tcl_tk()\r
+ self.test_Pmw()\r
+ if not len(self.l_errors):\r
+ print "Environnement Ok"\r
+ return 1\r
+ else :\r
+ print "Il manque des prérequis"\r
+ print "EFICAS ne peut pas être installé"\r
+ print "Erreurs : ",string.join(self.l_errors)\r
+ return 0\r
+\r
+class Slider:\r
+ def __init__(self, master=None, orientation="horizontal", min=0, max=100,\r
+ width=100, height=25, autoLabel="true", appearance="sunken",\r
+ fillColor="blue", background="black", labelColor="yellow",\r
+ labelText="", labelFormat="%d%%", value=50, bd=2):\r
+ # preserve various values\r
+ self.master=master\r
+ self.orientation=orientation\r
+ self.min=min\r
+ self.max=max\r
+ self.width=width\r
+ self.height=height\r
+ self.autoLabel=autoLabel\r
+ self.fillColor=fillColor\r
+ self.labelColor=labelColor\r
+ self.background=background\r
+ self.labelText=labelText\r
+ self.labelFormat=labelFormat\r
+ self.value=value\r
+ self.frame=Tkinter.Frame(master, relief=appearance, bd=bd)\r
+ self.canvas=Tkinter.Canvas(self.frame, height=height, width=width, bd=0,\r
+ highlightthickness=0, background=background)\r
+ self.scale=self.canvas.create_rectangle(0, 0, width, height,\r
+ fill=fillColor)\r
+ self.label=self.canvas.create_text(self.canvas.winfo_reqwidth() / 2,\r
+ height / 2, text=labelText,\r
+ anchor="c", fill=labelColor)\r
+ self.update()\r
+ self.canvas.pack(side='top', fill='x', expand='no')\r
+\r
+ def update(self):\r
+ # Trim the values to be between min and max\r
+ value=self.value\r
+ if value > self.max:\r
+ value = self.max\r
+ if value < self.min:\r
+ value = self.min\r
+ # Preserve the new value\r
+ c=self.canvas\r
+ # Adjust the rectangle\r
+ if self.orientation == "horizontal":\r
+ c.coords(self.scale,0, 0,float(value) / self.max * self.width, self.height)\r
+ else:\r
+ c.coords(self.scale,0, self.height - (float(value) / self.max*self.height),self.width, self.height)\r
+ # Now update the colors\r
+ c.itemconfig(self.scale, fill=self.fillColor)\r
+ c.itemconfig(self.label, fill=self.labelColor)\r
+ # And update the label\r
+ if self.autoLabel=="true":\r
+ c.itemconfig(self.label, text=self.labelFormat % value)\r
+ else:\r
+ c.itemconfig(self.label, text=self.labelFormat % self.labelText)\r
+ c.update_idletasks()\r
+try :\r
+ import Tkinter\r
+ import Pmw\r
+ from tkMessageBox import showinfo,askyesno,showerror,askretrycancel\r
+except:\r
+ pass\r
+\r
+class SplashScreen(Tkinter.Toplevel):\r
+ """ Provides a splash screen. Usage:\r
+ Subclass and override 'CreateWidgets()'\r
+ In constructor of main window/application call\r
+ - S = SplashScreen(main=self) (if caller is Toplevel)\r
+ - S = SplashScreen(main=self.master) (if caller is Frame)\r
+ - S.quit() after you are done creating your widgets etc.\r
+ """\r
+ def __init__(self, master,**args):\r
+ Tkinter.Toplevel.__init__(self, master, relief='groove',borderwidth=5)\r
+ self.protocol("WM_DELETE_WINDOW",lambda x=0: x+x ) # pour ne pas détruire la fenêtre en pleine copie de fichiers\r
+ self.main = master\r
+ if self.main != None :\r
+ self.main.withdraw()\r
+ self.frame = Tkinter.Frame(self)\r
+ self.frame.pack(expand=1,fill='both')\r
+ self.init(args)\r
+ self.geometry("300x200")\r
+ self.resizable(0,0)\r
+ self.CreateWidgets()\r
+\r
+ def init(self,args={}):\r
+ self.text = Tkinter.StringVar()\r
+ self.text.set('')\r
+ self.icone = 'Editeur/icons/logo_edf.gif'\r
+ self.barre = 'non'\r
+ if args == {} : return\r
+ if args.has_key('text'):\r
+ self.text.set(args['text'])\r
+ if args.has_key('titre'):\r
+ self.title(args['titre'])\r
+ if args.has_key('code'):\r
+ self.code = args['code']\r
+ else:\r
+ self.code = 'inconnu'\r
+ if self.code == 'ASTER' :\r
+ self.icone = 'Editeur/icons/code_aster.gif'\r
+ \r
+ def CreateWidgets(self):\r
+ fic_image = os.path.join("./", self.icone)\r
+ if os.path.exists(fic_image):\r
+ self.catIcon = Tkinter.PhotoImage(file=os.path.join("./", self.icone))\r
+ Tkinter.Label(self.frame, image=self.catIcon).pack(side=Tkinter.TOP)\r
+ else:\r
+ Tkinter.Label(self.frame, text = "EFICAS pour Code_Aster").pack(side=Tkinter.TOP)\r
+ self.label = Tkinter.Label(self.frame, textvariable=self.text)\r
+ self.label.pack(side=Tkinter.TOP,expand=1,fill='both')\r
+ self.progress = Slider(self.frame,value=0,max=100,orientation='horizontal',\r
+ fillColor='blue',width=200,height=30,\r
+ background='white',labelColor='red')\r
+\r
+ def update_barre(self,event=None):\r
+ """ Permet de faire avancer la barre de progression """\r
+ try:\r
+ self.progress.value = self.progress.value+self.increment\r
+ self.progress.update()\r
+ #self.after(100,self.update_barre)\r
+ except:\r
+ pass\r
+\r
+ def configure_barre(self):\r
+ """ Calcule l'incrément de progression de la barre en fonction\r
+ du nombre d'opérations à effectuer afin que le compteur\r
+ soit à 100% à la fin des opérations"""\r
+ self.increment = 100./self.ratio\r
+ self.progress.update()\r
+\r
+ def configure(self,**args):\r
+ if args.has_key('text'):\r
+ self.text.set(args['text'])\r
+ if args.has_key('titre'):\r
+ self.title(args['titre'])\r
+ if args.has_key('barre'):\r
+ old = self.barre\r
+ self.barre = args['barre']\r
+ if self.barre == 'oui' and old == 'non':\r
+ self.progress.frame.pack(in_=self.frame,side='top')\r
+ elif self.barre == 'non' and old == 'oui':\r
+ self.progress.frame.pack_forget()\r
+ if args.has_key('ratio'):\r
+ self.ratio = args['ratio']\r
+ self.configure_barre()\r
+ self.update()\r
+ \r
+ def quit(self):\r
+ self.progress = None\r
+ self.withdraw()\r
+ self.main.update()\r
+ self.main.deiconify()\r
+\r
+def centerwindow(window,parent = 'avec'):\r
+ if parent =='avec':\r
+ parent = window.winfo_parent()\r
+ if type(parent) == types.StringType:\r
+ try:\r
+ parent = window._nametowidget(parent)\r
+ except:\r
+ parent = window\r
+ # Find size of window.\r
+ window.update_idletasks()\r
+ width = window.winfo_width()\r
+ height = window.winfo_height()\r
+ if width == 1 and height == 1:\r
+ # If the window has not yet been displayed, its size is\r
+ # reported as 1x1, so use requested size.\r
+ width = window.winfo_reqwidth()\r
+ height = window.winfo_reqheight()\r
+ # Place in centre of screen:\r
+ if parent =='avec' :\r
+ x = (window.winfo_screenwidth() - width) / 2 - parent.winfo_vrootx()\r
+ y = (window.winfo_screenheight() - height) / 3 - parent.winfo_vrooty()\r
+ else:\r
+ x = (window.winfo_screenwidth() - width) / 2 \r
+ y = (window.winfo_screenheight() - height) / 3\r
+ if x < 0:\r
+ x = 0\r
+ if y < 0:\r
+ y = 0\r
+ window.geometry('+%d+%d' % (x, y))\r
+ \r
+class config_item:\r
+ """\r
+ Classe utilisée pour représenter chaque option de configuration\r
+ """\r
+ def __init__(self, pere, nom):\r
+ self.nom = nom\r
+ self.pere = pere\r
+ self.entree_value = None\r
+ self.default = None\r
+ self.test = None\r
+ self.pere.register_item(self)\r
+\r
+ def get_valeur(self):\r
+ return os.path.abspath(self.entree.get())\r
+ \r
+ def set_entree(self,entree):\r
+ self.entree = entree\r
+ self.pere.register_entree(entree)\r
+\r
+class Config(Tkinter.Toplevel):\r
+ """\r
+ Classe principale : une instance de Config est utilisée pour\r
+ créer l'interface. Toutes les actions (création de répertoire, copie\r
+ de fichiers ...) sont réalisées par des méthodes de Config ou de ses\r
+ composants\r
+ """\r
+ pat_rep = re.compile(r'^(rep_)([\w_]*)') # expression réguliere pour reconnaitre les\r
+ # les options qui désignent des répertoires\r
+ def __init__(self, parent):\r
+ self.master = parent\r
+ Tkinter.Toplevel.__init__(self,None)\r
+ parent.withdraw()\r
+ self.title("Installation d'EFICAS")\r
+ self.geometry("500x320+0+0")\r
+ centerwindow(self)\r
+ self.install_running = 0\r
+ #évite que la fenêtre puisse être détruite en pleine copie de fichiers\r
+ self.protocol("WM_DELETE_WINDOW",self.exit )\r
+ # création des frames\r
+ self.frame_gen = Tkinter.Frame(self,bd=1,relief='groove')\r
+ self.frame_gen.place(relx=0,rely=0,relwidth=1,relheight=0.9 )\r
+ self.frame_but = Tkinter.Frame(self,bd=1,relief='groove')\r
+ self.frame_but.place(relx=0,rely=0.9 ,relheight=0.1 ,relwidth=1)\r
+ # création des items de configuration\r
+ self.make_items_config()\r
+ # remplissage de la frame générale\r
+ self.make_frame_gen()\r
+ # remplissage de la frame boutons\r
+ self.make_frame_but()\r
+ # création boîtes de dialogue\r
+ self.init_complementaire()\r
+ # init système\r
+ self.init_systeme()\r
+ \r
+ def make_items_config(self):\r
+ """\r
+ Création des objets Config_item\r
+ """\r
+ self.items = []\r
+ self.items_a_creer = []\r
+ self.liste_rep_crees = []\r
+ self.entrees = []\r
+ # designation, texte d'invite , option par defaut(unix), option par defaut(windows), flag obligatoire/facultatif\r
+ self.l_tx_items = (('rep_install' ,\r
+ "Répertoire d'installation :",\r
+ '',\r
+ '',\r
+ 'o'),\r
+ ('rep_travail' ,\r
+ 'Répertoire de travail :',\r
+ 'tmp',\r
+ 'tmp',\r
+ 'f'),\r
+ ('rep_mat' ,\r
+ 'Répertoire matériaux :',\r
+ None,\r
+ None,\r
+ 'f'),\r
+ ('rep_docaster' ,\r
+ "Chemin d'accès à la doc Aster :" ,\r
+ None,\r
+ None,\r
+ 'f'\r
+ ),\r
+ ('acrobat' ,\r
+ 'Exécutable Acrobat Reader :',\r
+ '/usr/bin/acroread',\r
+ 'acrobat.exe',\r
+ 'o')\r
+ )\r
+\r
+ for item in self.l_tx_items:\r
+ nom_item = item[0]\r
+ setattr(self,nom_item,config_item(self,nom_item))\r
+\r
+ def make_frame_gen(self):\r
+ """\r
+ Création des zones de saisie des paramètres généraux\r
+ """\r
+ # Création du label titre de la frame\r
+ self.information = Tkinter.Label(self.frame_gen,text="CONFIGURATION D'EFICAS")\r
+ self.information.pack(side="top",pady=10)\r
+ # création des widgets de saisie des items\r
+ for txt in self.l_tx_items:\r
+ nom_item = txt[0]\r
+ txt_item = txt[1]\r
+ if os.name == 'nt':\r
+ default_value = txt[3]\r
+ else:\r
+ default_value = txt[2]\r
+ item = getattr(self,nom_item)\r
+ wdg_item = Pmw.EntryField(self.frame_gen,\r
+ labelpos = 'w',\r
+ label_text = txt_item,\r
+ command = lambda s=self,i=item : s.select_next_entry(i.entree))\r
+ item.default_value = default_value\r
+ item.statut = txt[4]\r
+ item.set_entree(wdg_item)\r
+ # on affiche les entrées\r
+ for entree in self.entrees:\r
+ entree.pack(fill='x', expand=1, padx=10, pady=5)\r
+ Pmw.alignlabels(self.entrees)\r
+ self.entrees[0].focus_set()\r
+ #self.rep_cata_dev.entree.configure(entry_state = 'disabled')\r
+ self.display_defaults()\r
+ \r
+ def make_frame_but(self):\r
+ """\r
+ Création des boutons de commande Installer et Annuler\r
+ """\r
+ self.validButton = Tkinter.Button(self.frame_but, text = 'Installer', command = self.run_install)\r
+ self.exitButton = Tkinter.Button(self.frame_but,\r
+ text = 'Annuler',\r
+ command = lambda s=self : s.exit(annule='oui'))\r
+ self.exitButton.place(relx=0.35,rely=0.5,anchor='center')\r
+ self.validButton.place(relx=0.65,rely=0.5,anchor='center')\r
+\r
+ def init_complementaire(self):\r
+ """\r
+ Création de widgets complémentaires (boîtes de dialogue ...)\r
+ """\r
+ self.erreur_dialog = Pmw.Dialog(self,\r
+ buttons = ('Modifier', 'Annuler'),\r
+ defaultbutton = 'Modifier',\r
+ title = 'Erreur',\r
+ command = self.erreur_exec)\r
+ self.erreur_dialog.withdraw()\r
+ self.fatale_dialog = Pmw.Dialog(self,\r
+ buttons = ('Annuler',),\r
+ title = 'Fatal',\r
+ command = self.fatale_exec)\r
+ self.fatale_dialog.withdraw()\r
+ self.info_dialog = Pmw.Dialog(self,\r
+ buttons = ('Ok',),\r
+ title = 'Attention')\r
+ self.info_dialog.configure(command=self.info_dialog.withdraw())\r
+ self.info_dialog.withdraw()\r
+ self.attente = SplashScreen(None,code="ASTER")\r
+ self.attente.withdraw()\r
+\r
+ def init_systeme(self):\r
+ """\r
+ Détermine les commandes à exécuter en fonction de l'OS\r
+ """\r
+ self.d_commandes = {}\r
+ if os.name == 'nt':\r
+ self.d_commandes['decompress'] = "unzip.exe "\r
+ self.d_commandes['copy'] = "copy "\r
+ self.d_commandes['delete'] = "del "\r
+ elif os.name == 'posix':\r
+ self.d_commandes['decompress'] = "gunzip "\r
+ self.d_commandes['copy'] = "cp "\r
+ self.d_commandes['delete'] = "rm "\r
+\r
+ def run_install(self):\r
+ """\r
+ Lance l'installation proprement dite d'EFICAS\r
+ """\r
+ self.install_running = 1\r
+ self.afficher_splash()\r
+ self.deactivate_entries() # Les entrees et les boutons sont desactivees\r
+ self.deactivate_buttons() # pendant les operations d'installation\r
+ #self.decompress_archive()\r
+ #if not os.path.exists(os.path.join(REPERTOIRE,'Eficas')):\r
+ # self.afficher_fatale("Il manque des fichiers d'EFICAS")\r
+ # self.install_running = 0\r
+ # return\r
+ self.nb_fichiers = self.compte_fichiers(REPERTOIRE)\r
+ if self.nb_fichiers == 0:\r
+ self.afficher_fatale("Il manque des fichiers d'EFICAS")\r
+ self.install_running = 0\r
+ return\r
+ # essaie de creer les repertoires.\r
+ try:\r
+ if self.make_dirs() == ECHEC : \r
+ self.activate_entries() \r
+ self.activate_buttons() \r
+ self.install_running = 0\r
+ return\r
+ except:\r
+ self.install_running = 0\r
+ self.afficher_fatale("Impossible de créer certains répertoires")\r
+ \r
+ # affiche la fenêtre avec la barre de progression\r
+ self.afficher_copie_fichiers() \r
+ # essaie de copier les fichiers d'EFICAS\r
+ try:\r
+ if self.move_files() == ECHEC: \r
+ self.afficher_echec("Impossible de copier les fichiers d'EFICAS")\r
+ self.activate_buttons()\r
+ self.install_running = 0\r
+ return\r
+ except :\r
+ traceback.print_exc()\r
+ self.install_running = 0\r
+ self.afficher_fatale("Impossible de copier certains fichiers")\r
+\r
+ #self.rm_temp_dirs() # efface les répertoires temporaires\r
+ try:\r
+ self.creer_fic_conf() # crée le fichier eficas.conf\r
+ except:\r
+ afficher_info("Impossible de créer le fichier de configuration\n Il est possible de le faire a la main")\r
+# self.install_running = 0\r
+ self.afficher_install_terminee() # A ce stade tout est fait et il ne reste plus qu'à attendre\r
+ # un clic de souris pour sortir\r
+\r
+ def display_defaults(self):\r
+ """\r
+ Affiche les valeurs par défaut dans les zones de saisie\r
+ """\r
+ # racine indique la racine de l'arborescence\r
+ if os.name == 'nt':\r
+ racine = 'C:\\'\r
+ else:\r
+ racine = os.environ['HOME']\r
+ # remplit les zones de saisie avec les options par défaut\r
+ for item in self.items:\r
+ if item.default_value == None : continue\r
+ item.default_value = os.path.join(racine,item.default_value)\r
+ item.entree.insert(0,item.default_value)\r
+\r
+ def register_item(self,item):\r
+ """\r
+ Enregistre l'item dans la liste des items et éventuellement\r
+ dans la liste des items à créer (répertoires)\r
+ """\r
+ self.items.append(item)\r
+ if self.pat_rep.match(item.nom) :\r
+ self.items_a_creer.append(item)\r
+\r
+ def register_entree(self,entree):\r
+ """\r
+ Enregistre la zone de saisie dans la liste des zones\r
+ """\r
+ self.entrees.append(entree)\r
+\r
+ def select_next_entry(self,entree):\r
+ """\r
+ Place le focus dans l'entry suivant celle passée en argument\r
+ """\r
+ index = self.entrees.index(entree)+1\r
+ if index != len(self.entrees):\r
+ self.entrees[index].component('entry').focus()\r
+\r
+ def activate_entries(self):\r
+ """\r
+ Active les entrées. Les zones de saisie deviennent éditables.\r
+ """\r
+ for item in self.entrees:\r
+ item.configure(entry_state='normal')\r
+\r
+ def deactivate_entries(self):\r
+ """\r
+ Désactive les entrées. Les zones ne sont plus éditables.\r
+ """\r
+ for item in self.entrees: # Les entrees sont desactivees\r
+ item.configure(entry_state='disabled') # pendant les operations d'installation\r
+\r
+ def activate_buttons(self):\r
+ """\r
+ active les boutons valider et annuler\r
+ """\r
+ self.validButton.configure(state = 'normal')\r
+ self.exitButton.configure(state = 'normal')\r
+\r
+ def deactivate_buttons(self):\r
+ """\r
+ désactive des boutons valider de annuler\r
+ """\r
+ self.validButton.configure(state = 'disabled')\r
+ self.exitButton.configure(state = 'disabled')\r
+\r
+ def erreur_exec(self, result):\r
+ """\r
+ Callback exécuté lorsque l'utilisateur clique sur un des boutons\r
+ Modifier/Annuler de la fenêtre de dialogue qui lui présente les erreurs\r
+ """\r
+ self.erreur_dialog.deactivate(result)\r
+ self.removedir()\r
+ if result == 'Annuler':\r
+ self.install_running = 0\r
+ self.exit(annule='non')\r
+\r
+ def fatale_exec(self, result):\r
+ """\r
+ Callback exécuté lorsque l'utilisateur clique sur le bouton\r
+ Quitter de la fenêtre de dialogue qui lui présente les erreurs fatales\r
+ Seule solution : sortir de l'installation\r
+ """\r
+ self.fatale_dialog.deactivate(result)\r
+ self.install_running = 0\r
+ self.exit(annule='oui')\r
+ \r
+ def test_confirmation(self,flag,nom):\r
+ """\r
+ Callback activé par le clic sur bouton fenêtre demandant confirmation\r
+ avant création répertoire facultatif\r
+ """\r
+ if flag == 'NON':\r
+ self.confirmation.destroy()\r
+ self.TEST_confirmation_avant_creation = NON\r
+ return \r
+ else :\r
+ self.confirmation.destroy()\r
+ self.TEST_confirmation_avant_creation = OUI \r
+ \r
+ def afficher_fatale(self, message):\r
+ """\r
+ Affiche les erreurs fatales\r
+ """\r
+ self.attente.withdraw()\r
+ w = Tkinter.Label(self.fatale_dialog.interior(),text = message, pady = 5)\r
+ w.pack(expand = 1, fill = 'both', padx = 4, pady = 4)\r
+ self.fatale_dialog.configure(deactivatecommand = w.destroy)\r
+ self.fatale_dialog.activate()\r
+\r
+ def afficher_echec(self, message):\r
+ """\r
+ Affiche un message d'erreur\r
+ Par construction, dès que l'on passe par cette méthode, on sort de l'installation\r
+ en passant le flag install_running à 0\r
+ """\r
+ self.attente.withdraw()\r
+ w = Tkinter.Label(self.erreur_dialog.interior(),text = message, pady = 5)\r
+ w.pack(expand = 1, fill = 'both', padx = 4, pady = 4)\r
+ self.erreur_dialog.configure(deactivatecommand = w.destroy)\r
+ self.erreur_dialog.activate()\r
+\r
+ def confirmation_avant_creation(self,repertoire):\r
+ """\r
+ Affiche une boite de dialogue pour confirmer la création\r
+ d'un répertoire facultatif.\r
+ """\r
+ self.attente.withdraw()\r
+ self.confirmation = Pmw.Dialog(self,\r
+ buttons = ('OUI', 'NON'),\r
+ defaultbutton = 'OUI',\r
+ title = "Répertoire inexistant",\r
+ command = lambda f,s=self,r=repertoire : s.test_confirmation(f,r))\r
+ self.confirmation.withdraw()\r
+ Tkinter.Label(self.confirmation.interior(),\r
+ text="Le répertoire %s n'existe pas \n Voulez-vous le créer ?" %repertoire).pack(side='top')\r
+ self.confirmation.activate(geometry='centerscreenalways')\r
+ return self.TEST_confirmation_avant_creation\r
+ \r
+ def afficher_splash(self):\r
+ """\r
+ Afficher la boite de message \r
+ """\r
+ self.attente.deiconify()\r
+ self.attente.tkraise()\r
+ centerwindow(self.attente)\r
+ self.attente.configure(titre="Installation d'EFICAS",\r
+ text="Vérification intégrité sources Eficas",\r
+ barre="non")\r
+ \r
+ def afficher_info(self,message):\r
+ """\r
+ Afficher une boite de warning\r
+ """\r
+ w = Tkinter.Label(self.info_dialog.interior(),text = message, pady = 5)\r
+ w.pack(expand = 1, fill = 'both', padx = 4, pady = 4)\r
+ self.info_dialog.configure(deactivatecommand = w.destroy)\r
+ self.info_dialog.activate()\r
+ \r
+ def afficher_copie_fichiers(self):\r
+ """\r
+ Afficher la boite de message avec la barre de progression\r
+ """\r
+ self.attente.deiconify()\r
+ self.attente.tkraise()\r
+ self.attente.configure(titre="Installation d'EFICAS",\r
+ text="copie des fichiers",\r
+ barre="oui")\r
+ self.attente.ratio = self.nb_fichiers\r
+ self.attente.configure_barre()\r
+\r
+ def afficher_install_terminee(self):\r
+ """\r
+ Afficher le message Installation terminée\r
+ """\r
+ self.withdraw()\r
+ self.attente.configure(titre="Installation d'EFICAS",\r
+ text="Installation terminée",\r
+ barre="non")\r
+ self.exitButton.place_forget()\r
+ self.validButton.place_forget()\r
+ self.validButton = Tkinter.Button(self.attente.frame,\r
+ text = 'Quitter',\r
+ command = self.exit)\r
+ self.validButton.pack(side='top',pady=5)\r
+ self.install_running = 0\r
+\r
+ def decompress_archive(self) :\r
+ """\r
+ Décompresse l'archive d'EFICAS dans un répertoire temporaire (.)\r
+ """\r
+ print "decompress_archive"\r
+ #try:\r
+ commande = os.path.join(REPERTOIRE,self.d_commandes['decompress'])\r
+ fichier = os.path.join(REPERTOIRE,"eficas.zip")\r
+ print 'commande =',commande\r
+ print 'fichier =',fichier\r
+ os.execv(commande,("eficas.zip",))\r
+ #except:\r
+ # self.affiche_echec("Erreur dans la décompression")\r
+\r
+ def normaliser_chemin(self, nom):\r
+ """\r
+ Retourne le chemin d'accès complet à nom\r
+ """\r
+ return os.path.abspath(os.path.expanduser(nom))\r
+\r
+ def discriminer_noms(self):\r
+ """\r
+ Emet un message d'alerte si des zones de saisie ne sont pas remplies\r
+ ou si des noms de répertoires à créer sont identiques.\r
+ """\r
+ liste_noms = []\r
+ for item in self.items_a_creer:\r
+ nom = item.entree.get()\r
+ if nom == self.rep_install.entree.get(): # il faut ajouter 'Eficas' au chemin du repertoire\r
+ nom = os.path.join(nom,"Eficas") # d'installation\r
+ liste_noms.append(nom)\r
+\r
+ test = SUCCES\r
+ for item in self.items_a_creer:\r
+ nom = item.entree.get()\r
+ if len(nom) == 0 :\r
+ test = ECHEC\r
+ message = "attention : certains répertoires n'ont pas de nom"\r
+ self.afficher_echec(message)\r
+ item.entree.component('entry').focus()\r
+ break\r
+\r
+ if test == ECHEC :\r
+ return test\r
+\r
+ for item in self.items_a_creer:\r
+ nom = item.entree.get()\r
+ if liste_noms.count(nom) >1 :\r
+ test = ECHEC\r
+ message = "attention : certains répertoires ont le même nom"\r
+ self.afficher_echec(message)\r
+ item.entree.component('entry').focus()\r
+ break\r
+\r
+ return test\r
+\r
+ def compte_fichiers(self,path):\r
+ """\r
+ Dénombre les fichiers présents dans le répertoire Eficas (et ses sous-répertoires)\r
+ """\r
+ nb = 0\r
+ l_fic = os.listdir(path)\r
+ l_rep = []\r
+ for fic in l_fic :\r
+ if os.path.isdir(os.path.join(path,fic)):\r
+ l_rep.append(fic)\r
+ else:\r
+ nb = nb+1\r
+ for rep in l_rep :\r
+ nb = nb + self.compte_fichiers(os.path.join(path,rep))\r
+ return nb\r
+\r
+ def creer_fic_conf(self):\r
+ """\r
+ Crée le fichier editeur.ini a partir des données saisies\r
+ par l'administrateur.\r
+ """\r
+ fichier_conf = os.path.join(self.normaliser_chemin(self.rep_install.get_valeur()),"Eficas/Aster/editeur.ini")\r
+ f = open(fichier_conf,'w')\r
+ f.write("path_doc = "+'"'+self.normaliser_chemin(self.rep_docaster.get_valeur())+'"\n')\r
+ f.write("exec_acrobat = "+'"'+self.normaliser_chemin(self.acrobat.get_valeur())+'"\n')\r
+ f.write('isdeveloppeur = "NON"\n')\r
+ f.write("rep_travail = "+'"'+self.normaliser_chemin(self.rep_travail.get_valeur())+'"\n')\r
+ f.write("rep_cata = "+'"'+os.path.join(self.normaliser_chemin(self.rep_install.get_valeur()),"Eficas/Aster/Cata/")+'"\n') # attention au dernier slash\r
+ f.write("rep_mat = "+'"'+self.normaliser_chemin(self.rep_mat.get_valeur())+'"\n')\r
+ cata = """catalogues = (('ASTER','v6',rep_cata + 'cata_STA6.py','python','defaut'),)\n"""\r
+ f.write(cata)\r
+ f.close()\r
+ \r
+\r
+ def move_files(self):\r
+ """\r
+ Déplace les fichiers Eficas du répertoire temporaire vers\r
+ leur répertoire de destination\r
+ """\r
+ # création du répertoire Eficas\r
+ rep_eficas = os.path.join(self.rep_install.get_valeur(),'Eficas')\r
+ self.copy_rep(REPERTOIRE,rep_eficas)\r
+\r
+ def copy_rep(self,rep_dep,rep_arr):\r
+ """\r
+ Copie le répertoire path_dep et ses sous-répertoires dans path_arr\r
+ """\r
+ l_fichiers = os.listdir(rep_dep)\r
+ if not os.path.exists(rep_arr) :\r
+ # création du répertoire d'arrivée quand il n'existe pas \r
+ self.mkdirs(rep_arr)\r
+ for fic in l_fichiers :\r
+ nom_complet_dep = os.path.join(rep_dep,fic)\r
+ nom_complet_arr = os.path.join(rep_arr,fic)\r
+ if os.path.isfile(nom_complet_dep):\r
+ commande_copie = self.d_commandes['copy']+nom_complet_dep+' '+nom_complet_arr\r
+ commande_delete= self.d_commandes['delete']+nom_complet_dep\r
+ try:\r
+ os.system(commande_copie)\r
+ #os.system(commande_delete)\r
+ self.attente.update_barre()\r
+ except Exception,e:\r
+ pass\r
+ elif os.path.isdir(nom_complet_dep):\r
+ self.copy_rep(nom_complet_dep,nom_complet_arr)\r
+\r
+ def rm_temp_dirs(self):\r
+ """\r
+ Détruit le répertoire temporaire de l'archive d'Eficas\r
+ """\r
+ rep_arch = os.path.join(REPERTOIRE,'Eficas')\r
+ self.rm_r(rep_arch)\r
+\r
+ def make_dirs(self):\r
+ """\r
+ Crée les répertoires d'accueil des fichiers d'EFICAS\r
+ """\r
+ # création des répertoires dont l'utilisateur a donné le nom\r
+ if self.discriminer_noms() == ECHEC:\r
+ return ECHEC\r
+ for item in self.items_a_creer:\r
+ if not item.entree.get():\r
+ continue\r
+ nom = item.get_valeur()\r
+ if nom == self.normaliser_chemin(self.rep_install.entree.get()): # il faut ajouter 'Eficas' au chemin du repertoire\r
+ nom = os.path.join(nom,"Eficas") # d'installation\r
+ item.test = self.essai_creer(nom,item.statut)\r
+ if item.test == ECHEC :\r
+ item.entree.component('entry').focus()\r
+ return ECHEC\r
+ return SUCCES\r
+\r
+ def essai_creer(self, nom, statut):\r
+ """\r
+ Essaie de créer le répertoire nom s'il n'existe pas déjà.\r
+ Si statut == 'f' et si le fichier n'existe pas, demande\r
+ confirmation avant création\r
+ """\r
+ repertoire = self.normaliser_chemin(nom) # repertoire = chemin absolu de nom\r
+ if os.path.exists(repertoire):\r
+ if statut == 'o' :\r
+ self.afficher_echec("Un fichier ou répertoire de nom "+ repertoire+ " existe déjà !\n"+\r
+ "L'installation ne peut continuer")\r
+ return ECHEC\r
+ else:\r
+ return SUCCES\r
+\r
+ if statut == 'f' :\r
+ # on demande confirmation de création à l'utilisateur\r
+ test = self.confirmation_avant_creation(repertoire)\r
+ if test == NON:\r
+ return SUCCES\r
+\r
+ try:\r
+ test = self.mkdirs(repertoire)\r
+ return SUCCES\r
+ except Exception,e:\r
+ message = "La création de "+repertoire+" a échoué :\n %s \n Vérifiez vos droits d'écriture" %str(e) # message d'erreur\r
+ self.afficher_echec(message)\r
+ return ECHEC\r
+\r
+ def mkdirs(self,rep):\r
+ """\r
+ Création récursive des répertoires d'installation.\r
+ Les noms des répertoires crées sont stockés dans\r
+ une liste dont se sert la méthode removedir pour\r
+ restaurer l'environnement initial en cas d'annulation.\r
+ """\r
+ if rep==os.path.dirname(rep):\r
+ return SUCCES\r
+\r
+ if os.path.exists(os.path.dirname(rep)):\r
+ os.mkdir(rep)\r
+ self.liste_rep_crees.append(rep)\r
+ return SUCCES\r
+ else:\r
+ test = self.mkdirs(os.path.dirname(rep))\r
+ if test == SUCCES:\r
+ os.mkdir(rep)\r
+ self.liste_rep_crees.append(rep)\r
+ return SUCCES\r
+ else:\r
+ return ECHEC\r
+\r
+ def rm_r(self,path):\r
+ """\r
+ Detruit récursivement path\r
+ """\r
+ if not os.path.exists(path):\r
+ return\r
+ try:\r
+ if len(os.listdir(path))!=0:\r
+ for entree in os.listdir(path):\r
+ entree = os.path.join(path,entree)\r
+ self.rm_r(entree)\r
+ os.rmdir(path)\r
+ except Exception,e:\r
+ self.afficher_info("Impossible de détruire le répertoire : "+path+"\n"+"\n"+str(e)+"\n L'installation continue néanmoins")\r
+\r
+ def removedir(self):\r
+ """\r
+ Destruction des répertoires déja crées (en cas d'annulation)\r
+ """\r
+ for rep in self.liste_rep_crees:\r
+ self.rm_r(rep)\r
+ self.liste_rep_crees = []\r
+\r
+ def exit(self,annule='non'):\r
+ """\r
+ Tente de sortir de l'application.\r
+ Echoue si installation en cours\r
+ """\r
+ if self.install_running :\r
+ # l'installation est en cours --> on interdit la sortie\r
+ self.afficher_info("Impossible de quitter tant que l'installation est en cours\n Veuillez patienter")\r
+ else:\r
+ if annule == 'oui' : self.removedir()\r
+ self.master.quit()\r
+\r
+if __name__ == '__main__':\r
+ test = Test_Environnement().test()\r
+ if not test :\r
+ # environnement incomplet --> on sort de la procédure d'installation\r
+ sys.exit()\r
+ else:\r
+ import Tkinter\r
+ import Pmw\r
+ root = Tkinter.Tk()\r
+ Pmw.initialise(root)\r
+ try:\r
+ principal = Config(root)\r
+ root.mainloop()\r
+ except Exception,e:\r
+ print "Erreur non prévue rencontrée : ",str(e)\r
+ print "Veuillez prévenir la maintenance"\r
+ sys.exit()\r
import Accas
from Accas import *
+#CONTEXT.debug=1
+
import ops
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
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
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",
) ;
+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')),
+ ),
+ ),
+ );
+
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()
+
# 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
-#@ 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']
utilisée par héritage multiple pour composer les traitements.
"""
# Modules Python
-import string,types
+import string,types,sys
import traceback
# Modules EFICAS
# 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:
utilisée par héritage multiple pour composer les traitements.
"""
# Modules Python
-import string,types
+import string,types,sys
import traceback
# Modules EFICAS
# 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:
+# 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
+# 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
-#@ 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',
-#@ 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.
#
__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 : '
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)
(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,),
('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
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),
(err0,Table,t_err,MatchFail,MatchOk),
# <err9>
(err9,Table,t_err,MatchFail,MatchOk),
+ # <err11>
+ (err11,Table,t_err,MatchFail,MatchOk),
))
t_nom_ope = \
-#@ 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.
#
__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 : '
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)
<err>
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
'sign' = IsIn '+-':
commespaces F:next
'vexpr' = Table ThisTable F:<err10> T:<op>
- "PI" = Word 'PI' F:next T:<op>
+ t_PI F:next T:<op>
t_ident F:MatchFail
commespaces F:next
'listpar' = Is '(': # on peut avoir une liste de parametres
commespaces F:next
'vexpr' = Table t_vexpr F:<err>
commespaces F:next
- Is ')' F:<err9>
+ Is ')' F:<err11>
commespaces F:next
- Is ')' F:<err9>
+ Is ')' F:<err11>
commespaces F:next
Is ';' F:<err>
AllNotIn '\n' F:next
err0 = Table t_err F:MatchFail T:MatchOk
<err9>
err9 = Table t_err F:MatchFail T:MatchOk
+ <err11>
+ err11 = Table t_err F:MatchFail T:MatchOk
t_nom_ope is:
'nom_ope' = Table is:
+# 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.
+# 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.
+# 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.
+# 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.
+# 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.
-#@ 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
+# 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
+# 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.
+# 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.
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)
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:
+# 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.
+# 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.
+# 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.
+# 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.
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):
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):