Blender 3D: Noob to Pro/Advanced Tutorials/Python Scripting/Scripts for modifying meshes
(To be written.)
See saltshaker a basic but functional Python script for Blender. The page includes details of how it was made.
http://jmsoler.free.fr/didacticiel/blender/tutor/python_script01_en.htm is a good website for learning about mesh creation.