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