This is a doctest for the bpy module. bpy is a new py api for Blender, see http://members.optusnet.com.au/cjbarton/BPY_API/Bpy-module.html A port of the bpy data access example, 'make a new object from an existing mesh and make it active'. This assumes the default blend. >>> import bpy >>> scn = bpy.data.scenes.active >>> me = bpy.data.meshes['Cube'] >>> me.name 'Cube' >>> ob = scn.objects.new(me) #new object from the mesh >>> scn.objects.active = ob >>> scn.objects.active.data.name 'Cube'