Salome HOME
Join modifications from branch CEAFor_V3_2_0
[tools/medcoupling.git] / doc / MEDMEM / MEDMEM_InvokingDriverAtObjectCreationTime.py
1 ######################################################################
2 #                                                                    #
3 # This Python script should be executed when the shared library is   #
4 # generated using SWIG 1.3 (or higher) due to the fact that older    #
5 # version could not handle the wrapping of several class constructor #
6 #                                                                    #
7 ######################################################################
8 from libMEDMEM_Swig import *
9
10 medFile = "pointe.med"
11 fieldName = "fieldcelldouble"
12 meshName = "maa1"
13
14 try:
15     print "Creation of MESH object"
16     myMesh = MESH(MED_DRIVER,medFile,meshName)
17
18     print "Creation of MED object"
19     myMed = MED(MED_DRIVER,medFile)
20
21     print "Test the driver removal dor MESH"
22     myMesh.rmDriver()
23
24     print "Test the driver removal dor MED"
25     myMed.rmDriver()
26
27     print "End of Python script"
28     
29 except:
30     print "There is a problem somewhere !!"
31     print "Consult the error standart output of the python execution !!"