Rotating a mesh in Python (2.70a)

Hello,

#Blender 2.70a

import bpy

coords=[(0,0.5,0),(0.5,-0.5,0),(-0.5,-0.5)] # Vertices for a triangle on the x-y plane

faces[(2,1,0)]# Create a face

me = bpy.data.meshes.new(“MyMesh”) # create a new mesh
ob = bpy.data.objects.new(“triangle”, me) # create an object with that mesh

bpy.context.scene.objects.link(ob) # Link object to scene

me.from_pydata(coords,[], faces ) # edges or faces should be [], or you ask for problems
me.update(calc_edges=True) # Update mesh with new data