bmesh and mesh needs help simple mesh build

I been trying to get the new mesh format to work but no luck. I try to understand the import obj file and not sure how the faces work. As well for the uv texture. I am getting no where at this point. >.<

me ="test")
ob ="TestObject",me)[0]
verts = [(0,0,0),(2,0,0),(2,0,2)]
faces = [(1,2,3)]

me.vertices.foreach_set("co", unpack_list(verts))
me.tessfaces.foreach_set("vertices_raw", (faces))#not working

This fail to work. Any one?

In my Blender 2.62 ‘unpack_list’ does not exist ?

Maybe you look in ‘templates’ for to learn how it is possible too

That help but needed to get the uv texture working with it. Just not how it setup right.

Manage to see how the code work a bit. Trying to get the uv texture working with this type format.

It base on importer .obj format.

        me ="test")
        obmade ="TestObject",me)
        print("Create Simple Mesh")[0]
        for i in bpy.context.scene.objects: = False #deselect all objects = True = obmade

        verts = [(0,0,0),(2,0,0),(2,0,2)]
        edges = [(0,1),(1,2),(2,0)]
        faces = []
        for face in me.tessfaces:
        me.vertices.foreach_set("co", unpack_list(verts))
        me.tessfaces.foreach_set("vertices_raw", unpack_list(faces))
        me.edges.foreach_set("vertices", unpack_list(edges))
        #for uv in me.tessface_uv_textures: