# -*- coding: iso-8859-1 -*-
# --
-# Copyright (C) 2009-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2009-2016 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
from MEDLoader import *
+def my_remove(f):
+ from os import remove
+ try:
+ remove(f)
+ except OSError:
+ pass
+ return
+
def convert(file_in, driver_in, driver_out, format=1, file_out=None):
#
print file_in
sw.setMEDFileDS(mfd,0);#0 ?
sw.write(file_out)
#
+ mesh = mfd.getMeshes()[0]
+ mesh_dim = mesh.getSpaceDimension()
if mesh_dim >= 3:
from sys import platform
if platform in ["win32"]: