Can not figure out why this python mesh object script will not run
Your script has two minor issues 

Line 11,12 should be removed

#mesh.from_pydata(verts,[],faces)
#mesh.update(calc_edges=True)


The console window from Menu:Window/Toggle System Console shows a traceback:

  File "\Text", line 51, in &lt;module&gt;
  File "C:\Program Files\Blender Foundation\Blender\2.70\scripts\modules\bpy_typ
es.py", line 418, in from_pydata
    p.vertices = f
TypeError: bpy_struct: item.attr = val: expected sequence items of type int, not
 numpy.int32


this means that for some reason the face's values are of type numpy.int32 instead of the expected int type. 

This is easy to fix. Just add casts to int type in line 40:

face = (int(iv1),int(iv2),int(iv3),int(iv4))