To clarify, I don’t generate or read any msh-files directly, I run the pygmsh command:
msh = pygmsh.generate_mesh(geom)
which returns an “msh” object. I don’t know if that is the same thing as reading an msh-file generated by gmsh (pygmsh generates temporary .geo->.msh files, in /tmp, but the user never see them).