SET(PYFILES_TO_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/MEDLoader.py ${CMAKE_CURRENT_SOURCE_DIR}/libMEDLoader_Swig.py)
INSTALL_AND_COMPILE_PYTHON_FILE("${PYFILES_TO_INSTALL}" ${MED_salomescript_PYTHON})
-INSTALL(FILES MEDLoaderDataForTest.py MEDLoaderTest.py MEDLoaderTest2.py MEDLoaderTest3.py DESTINATION ${MED_salomescript_PYTHON})
+INSTALL(FILES MEDLoaderDataForTest.py MEDLoaderTest.py MEDLoaderTest2.py MEDLoaderTest3.py medutilities.py DESTINATION ${MED_salomescript_PYTHON})
+INSTALL(FILES med2sauv sauv2med PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION ${MED_salomescript_PYTHON} )
ADD_TEST(MEDLoaderTest ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDLoaderTest.py)
ADD_TEST(MEDLoaderTest2 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDLoaderTest2.py)
CLEANFILES = MEDLoader_wrap.cxx MEDLoader.py
-dist_salomescript_DATA= MEDLoaderDataForTest.py MEDLoaderTest.py MEDLoaderTest2.py MEDLoaderTest3.py libMEDLoader_Swig.py
+dist_salomescript_DATA= MEDLoaderDataForTest.py MEDLoaderTest.py MEDLoaderTest2.py MEDLoaderTest3.py libMEDLoader_Swig.py med2sauv sauv2med medutilities.py
nodist_salomescript_DATA = MEDLoader.py
-UNIT_TEST_PROG = MEDLoaderTest.py MEDLoaderTest2.py
\ No newline at end of file
+UNIT_TEST_PROG = MEDLoaderTest.py MEDLoaderTest2.py
from sys import argv,path
from os.path import dirname,abspath,sep
+from medutilities import med2sauv
d = argv[0]
d = dirname(d)
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"]:
from sys import argv,path
from os.path import dirname,abspath,sep
+from medutilities import sauv2med
d = argv[0]
d = dirname(d)