Ah - it was something really stupid and simple.
I think I’ve deduced parts of how to use the script, however, I’m yet to make it work - even the example you provided.
I can assign a vertex group OK and then set the modifier up. It looks modified as you’d expect.
However, once I run the script, the plane becomes totally flat again and if I run the script I get a console error: a traceback to line 24 - AttributeError: this mesh contains no deform vertices…
I don’t know what that’s all about.
I know Python OK - but I know very little about the Python API in Blender - something I’m wanting to learn. Is it possible to run PDB or WinPDB within Blender?