-print "Create aGroupOnShell - a group linked to a shell"
-aGroupOnShell = mesh.CreateGroupFromGEOM(SMESH.EDGE, "GroupOnShell", shell)
-print "aGroupOnShell type =", aGroupOnShell.GetType()
-print "aGroupOnShell size =", aGroupOnShell.Size()
-print "aGroupOnShell ids :", aGroupOnShell.GetListOfID()
+print("Create aGroupOnShell - a group linked to a shell")
+aGroupOnShell = mesh.GroupOnGeom(shell, "GroupOnShell", SMESH.EDGE)
+print("aGroupOnShell type =", aGroupOnShell.GetType())
+print("aGroupOnShell size =", aGroupOnShell.Size())
+print("aGroupOnShell ids :", aGroupOnShell.GetListOfID())