I would expect a user to run gmsh separately (at the command line or through the GUI), rather than from within the Python script. I don't think it's possible to interact with gmsh from Python nowadays without jumping through considerable hoops.
Have you tried the (free third-party) PyGmsh? It generates .geo code from Python. From there one calls Gmsh using Python subprocess and reads in the resulting .msh. I've found it handy.