Scripting - vertex won't extrude
Invoking the bpy.ops.mesh.dupli_extrude_cursor(rotate_source=True)
 operator leads to this error message in the console window:

wm_operator_invoke: invalid operator call 'MESH_OT_dupli_extrude_cursor'


Although is is exactly what is printed in info header when manually extruding a vertex.

I can't tell why this doesn't work but try this:

import bpy
import random

#generate random number
def RN():
    return int(random.random()*400)/20

verts = []
edges = []
faces = []
for i in range(1,100):
#set 3d cursor to random location
    verts.append(( RN(),RN(),RN()))
    edges.append((i-1,i))
edges.pop() # remove last edge
print( verts )
print ( edges )
mesh = bpy.data.meshes.new("rand_mesh") 
mesh.from_pydata(verts, edges, faces)  
rand_obj = bpy.data.objects.new("rand_object", mesh) 
scene = bpy.context.scene 
scene.objects.link(rand_obj)


I really don't know for what something like this could be useful:



See also 

http://wiki.blender.org/index.php/Doc:2.6/Manual/Extensions/Python/Geometry