Assign variable selecting vertex group in blender
This is a python script which will select all the vertices in a vertex group with weight>0.5

import bpy
import bmesh

def selvg(obj, name):
    bm = bmesh.from_edit_mesh(obj.data)
    for i in range(len(obj.data.vertices)):
        try:
            s = obj.vertex_groups[name].weight(i) &gt;0.5
            s=True # or maybe you don't care what the weight is, and even weight 0 is acceptable
        except:
            s=False
        bm.verts[i].select = s
    bmesh.update_edit_mesh(obj.data)

selvg(bpy.context.active_object, "Group")