How to hide/show, delete mesh's vertices in python script?

As the title. Thank you.

the nmesh module

http://www.blender.org/modules/documentation/233PythonDoc/NMesh-module.html

so, here is some simple code to delete a few faces

import Blender
nm = Blender.Object.GetSelected()[0].getData() # returns an NMesh object if the active object is a mesh
nm.faces.remove(nm.faces[3])
nm.faces.remove(nm.faces[0])
nm.update()

you can see if a face is active/selected/hidden by its flags

thanks
for the vert-wise that I mentioned, the code is


import Blender 
nm = Blender.Object.GetSelected()[0].getData()
nm.verts.remove(nm.verts[0])
nm.update()

I did not found the methods corresponding to HKey and Alt+HKey in the 3d windows.