In Blender Python I can add a lamp by doing the following:
DataBlock = bpy.data.lamps.new(name='HemiA', type='HEMI')
ObjHandle = bpy.data.objects.new(name='HemiA', object_data=DataBlock)
bpy.context.scene.objects.link(ObjHandle)
I want to do the same for mesh primitives such as Suzanne. There is an operator for this: bpy.ops.mesh.primitive_monkey_add()
, however there doesn't seem to be any way to create a mesh primitive data block.