Salome HOME
ajout properties.py
[tools/eficas.git] / Exemples / ex24 / main.py
1 """
2 """
3
4 import sys
5 sys.path[:0]=['../..','../../Minicode']
6
7 import cata_saturne
8
9 import convert
10 c=convert.plugins['python']()
11 c.readfile('kk.py')
12 text=c.convert('exec')
13 print text
14
15 j=cata_saturne.JdC(procedure=text,cata=cata_saturne,nom="essai_saturne")
16
17 j.analyse()
18 if not j.cr.estvide():
19    print j.cr
20    sys.exit()
21
22 cr=j.report()
23 if not cr.estvide():
24    print cr
25    sys.exit()
26
27 # On récupère les plugins de la famille generator
28 import generator
29
30 g=generator.plugins['python']()
31 print g.gener(j,format='beautifie')
32 g.writefile('titi.comm')
33