Salome HOME
Windows support
[modules/med.git] / src / MEDCalc / tui / medimages.py
index 88b4c6d33879709b51c0c916d84f9b66f49a8b6f..6493341039f053f0a19374d4ae321e23f981a8c3 100644 (file)
 
 # Author : Guillaume Boulant (EDF)
 
-import MEDCoupling as MC
+import sys
+if sys.platform == "win32":
+  import MEDCouplingCompat as MC
+else:
+  import MEDCoupling as MC
+
 import MEDLoader as ML
 
 from PIL import Image
@@ -83,10 +88,10 @@ class FieldBuilder:
         coordsY.setValues(arrY,nbNodesY,1)
 
         cmesh.setCoords(coordsX,coordsY)
-        print "Imagem mesh dimension: %d"%cmesh.getSpaceDimension()
+        print("Imagem mesh dimension: %d"%cmesh.getSpaceDimension())
 
         # WARN: In the current state of development of MEDLoader, only
-        # unstructured meshes are supported for writting function in med
+        # unstructured meshes are supported for writing function in med
         # files. We just have to convert the cartesian mesh in an unstructured
         # mesh before creating the field.
         umesh=cmesh.buildUnstructured();