creating n random points on face of mesh I'm trying to select 400 or so random points on the face of a mesh using a script (just on the face, not inside the volume) but I'm not sure how to do that. 

I've tried looking into the following function:

bpy_extras.mesh_utils.face_random_points(num_points, tessfaces)


but I'm not sure how to use it in a script.

Currently, I've tried running it as such:

import bmesh

obj = bpy.data.objects[1] #Gets the object
me = obj.data
bm = bmesh.from_edit_mesh(me)
faces_select = [f for f in bm.faces if f.select]
bpy_extras.mesh_utils.face_random_points(400, faces_select)


but I get the following error:

Traceback (most recent call last):
  File "&lt;blender_console&gt;", line 1, in &lt;module&gt;
  File "C:\Program Files\Blender Foundation\Blender\2.75\scripts\modules\bpy_extras\mesh_utils.py", line 533, in face_random_points
    verts = f.id_data.vertices
AttributeError: 'BMFace' object has no attribute 'id_data'


and I have no idea what that means. A simple script to select an object from bpy.data.objects and select 400 points from its faces would be really helpful.
as it is written bpy_extras.mesh_utils.face_random_points(num_points, tessfaces) takes tessfaces not faces and to get access to the you'll have to calculate first :

obj = bpy.context.object #Gets the object
me = obj.data
me.calc_tessface() # recalculate tessfaces
tessfaces_select = [f for f in me.tessfaces if f.select]
bpy_extras.mesh_utils.face_random_points(400, tessfaces_select)