Every operation that can be performed in Blender’s interface can also be found in the bpy.ops module.
bpy.ops.mesh.delete()
Be advised though, this operation will work exactly as deleting vertices from a menu, so it will only work while in edit mode, and it will remove all vertices that are marked as selected. However, selecting vertices and toggling edit mode can also be done using Python script, so this shouldn’t be a problem.
You can also take a more low-level approach by rebuilding your mesh from scratch, like in this tutorial.
If you want to do mesh editing through Python I recommend you use the bmesh module as this is what it was designed for. Here is an example where the active object is a mesh.
import bpy, bmesh
ob = bpy.context.active_object
me = ob.data
bm = bmesh.new()
bm.from_mesh(me)
# First vertex
v = bm.verts[0]
# Remove this vert
bm.verts.remove(v)
# Write the mesh back
bm.to_mesh(me)
For nicer mesh element removal and editing have a look into bmesh.utils module. Also, this script requires the object to be in object mode, if you want to edit the mesh in editmode, then replace:
Thank you for the example, I did not realize there was another layer to bMesh. With all the noise about it replacing the standard mesh model I just assumed it was all built in to the mesh.
@Truman: thanks from me as well. The bMesh module does indeed look a lot friendlier than what I’ve worked with up until now. This will speed things up nicely.