Salome HOME
PN : pour prendre en compte le nouveau panneau : UNIQUE_ASSD_Panel_Reel
[tools/eficas.git] / Exemples / ex12 / main.py
1 # -*- coding: utf-8 -*-
2 """
3    Exemple d'utilisation d'un JDC
4
5    Dans un premier temps on vérifie la conformite de l'objet 
6    de définition ::
7
8       cr=OP1.report()
9       if cr.estvide(): ...
10
11    Dans un deuxième temps, on construit plusieurs objets de type 
12    ETAPE dont la définition est OP1 et on vérifie la conformité
13    de ces objets.
14 """
15
16 import sys
17 sys.path[:0]=['../..']
18
19 import cata
20 from cata import JdC
21
22 cr=JdC.report()
23 print cr
24
25 text="""
26
27 a=OP1(a=1)
28 b=OP1(a=1,b=a)
29 c=OP1(a=1,b=10)
30 """
31
32 j=JdC(procedure=text,cata=cata,nom="bidon")
33
34 j.compile()
35 print j.cr
36
37 j.exec_compile()
38 print j.cr
39
40 cr=j.report()
41 print cr