Salome HOME
Copyright update 2021
[tools/medcoupling.git] / src / MEDLoader / Swig / CaseIO.py
index d472c3e7d184efa66a3bb778397b3ea6ed944e68..2f318eb25d93f32f6f7e9c9f1f0a976fdc76350b 100644 (file)
@@ -1,10 +1,10 @@
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2013  CEA/DEN, EDF R&D
+# Copyright (C) 2007-2021  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 # License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 #
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
-# Author Anthony GEAY (CEA/DEN/DM2S/STMF/LGLS)
+# Author Anthony GEAY (CEA/DEN/DM2S/STMF/LGLS)
 
 from MEDLoader import *
 
 class CaseIO:
-    dictMCTyp={NORM_HEXA8:"hexa8",NORM_POLYHED:"nfaced",NORM_QUAD4:"quad4",NORM_POLYGON:"nsided",NORM_POINT1:"point",NORM_SEG2:"bar2",NORM_SEG3:"bar3",NORM_TRI3:"tria3",NORM_TRI6:"tria6",NORM_QUAD8:"quad8",NORM_TETRA4:"tetra4",NORM_TETRA10:"tetra10",NORM_PYRA5:"pyramid5",NORM_PYRA13:"pyramid13",NORM_PENTA6:"penta6",NORM_PENTA15:"penta15",NORM_HEXA20:"hexa20"}
+    dictMCTyp_str={NORM_HEXA8:"hexa8",NORM_POLYHED:"nfaced",NORM_QUAD4:"quad4",NORM_POLYGON:"nsided",NORM_POINT1:"point",NORM_SEG2:"bar2",NORM_SEG3:"bar3",NORM_TRI3:"tria3",NORM_TRI6:"tria6",NORM_QUAD8:"quad8",NORM_TETRA4:"tetra4",NORM_TETRA10:"tetra10",NORM_PYRA5:"pyramid5",NORM_PYRA13:"pyramid13",NORM_PENTA6:"penta6",NORM_PENTA15:"penta15",NORM_HEXA20:"hexa20"}
+    dictMCTyp = {k:bytes(v, "ascii") for k, v in list(dictMCTyp_str.items())}
     discSpatial={ON_CELLS:"element",ON_NODES:"node"}
     dictCompo={1:"scalar",3:"vector",6:"tensor",9:"tensor9"}
-    dictMCTyp2=dict((v,k) for k,v in dictMCTyp.iteritems())
-    discSpatial2=dict((v,k) for k,v in discSpatial.iteritems())
-    dictCompo2=dict((v,k) for k,v in dictCompo.iteritems())
-    pass
+    dictMCTyp2 = {v:k for k, v in list(dictMCTyp.items())}
+    discSpatial2 = {v:k for k, v in list(discSpatial.items())}
+    dictCompo2 = {v:k for k, v in list(dictCompo.items())}