gmsh: sudo apt install gmsh
meshio: pip install "meshio[all]"
import meshio
mesh = meshio.read("<your_file>.msh")
# this makes an Nx3 matrix of the vertices in each triangle
# the vertices can index `mesh.points` to get the vertex coordinates
triangles = np.concatenate([ cell.data for cell in mesh.cells if cell.type == "triangle"])
mesh.write("<your_file>.msh",file_format="gmsh22")