Mesh is Grey after adding an Image/Texture to a material I need some help making a mesh colorful. The image I add to a material does not show up on my mesh. A snippet of the code is below

# Create new mesh
mesh = bpy.data.meshes.new("Landscape_Data")

# Make a mesh from a list of verts/edges/faces.
mesh.from_pydata(verts, edges, faces)

# Update mesh geometry after adding stuff.
mesh.update(calc_edges=True)

obj = bpy.data.objects.new("Landscape", mesh)  
obj.data = mesh 

# Link mesh to scene
scene = bpy.context.scene  
scene.objects.link(obj)  
obj.select = True 

def material_for_texture(fname):
    img = bpy.data.images.load(fname)

    tex = bpy.data.textures.new(fname, 'IMAGE')
    tex.image = img

    mat = bpy.data.materials.new(fname)
    mat.texture_slots.add()
    ts = mat.texture_slots[0]
    ts.texture = tex
    ts.texture_coords = 'UV'
    return mat

obj = bpy.data.objects['Landscape']
mat = material_for_texture("C:\\Users\\Kyle\\Documents\\DTEEC_019358_2225_018857_2225_U01.ca.jpg")

if len(obj.data.materials)&lt;1:
    obj.data.materials.append(mat)
else:
    obj.data.materials[0] = mat


Example: https://i.stack.imgur.com/jbNjK.png

The material looks like it loads the image but does not put it on the mesh
I can see you're using Blender Internal. Use Viewport shading  and select Material to see your image or texture in the viewport. And to achieve what you want, create new image in the UV editor, open the texture in it and unwrap the mesh. Scale down the UVs if necessary to have them inside the image area.