import meshio import numpy as np mesh = meshio.read( '/home/cflin/MatlabCode/TetWild/build/wrench_init_.msh', # string, os.PathLike, or a buffer/open file # file_format="stl", # optional if filename is a path; inferred from extension # see meshio-convert -h for all possible formats ) np.savetxt('TV.txt', mesh.points, fmt='%e') np.savetxt('TT.txt', mesh.cells[0]{1}) # mesh.points, mesh.cells, mesh.cells_dict, ... # mesh.vtk.read() is also possible