Salome HOME
sauve du 20/12
[tools/eficas.git] / Editeur / chercheNbElem.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 # Copyright (C) 2007-2013   EDF R&D
4 #
5 # This library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License.
9 #
10 # This library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 # Lesser General Public License for more details.
14 #
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with this library; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
18 #
19 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #
21
22 import sys,os
23 sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..'))
24 sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'../InterfaceQT4'))
25 sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'../UiQT4'))
26 from Extensions.i18n import tr
27 from string import split,strip,lowercase,uppercase
28 import re,string
29 import Accas
30
31
32 class ChercheInto:
33         def __init__(self,cata,cataName):
34                 self.cata=cata
35                 self.dictInto={}
36                 mesCommandes=self.cata.JdC.commandes
37                 print "________________________"
38                 for maCommande in mesCommandes:
39                     print maCommande.nom
40                     print maCommande.entites 
41                     print len(maCommande.entites) 
42
43
44 #        def construitListeInto(self,e):
45 #            if isinstance(e,Accas.A_BLOC.BLOC) :
46 #               print e.condition
47 #            for nomFils, fils in e.entites.items():
48 #                self.construitListeInto(fils)
49
50
51 if __name__ == "__main__" :
52         #monCata="/local/noyret/Install_Eficas/MAP/mapcata.py"
53         #monCata="/local/noyret/Install_Eficas/Aster/Cata/cataSTA11/cata.py"
54         #monCata="/local/noyret/Install_Eficas/MAP/mapcata.py"
55         monCata="/local/noyret/Install_Eficas/MAP/mapcata.py"
56         code="MAP"
57         version=None
58
59         from Editeur  import session
60         options=session.parse(sys.argv)
61         if options.code!= None :    code=options.code
62         if options.cata!= None : monCata=options.cata
63         if options.ssCode!= None :  ssCode=options.ssCode
64
65         sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..',code))
66
67         from InterfaceQT4.ssIhm  import QWParentSSIhm, appliEficasSSIhm
68         Eficas=appliEficasSSIhm(code=code)
69         parent=QWParentSSIhm(code,Eficas,version)
70
71         import readercata
72         monreadercata  = readercata.READERCATA( parent, parent )
73         Eficas.readercata=monreadercata
74         monCata=monreadercata.cata[0]
75
76         monConstruitInto=ChercheInto(monCata,code)
77
78
79
80