Does anybody know how to paint multiple meshes using scripts?
Can set the material directly with obj.active_material.  The material index will be obj.active_material_index.  The material can be set directly to the faces with face.material_index.  Note I've used the scene.objects collection, and only looked at mesh type objects.

Test code below. 

Textures fine, commented out re filename.

import bpy

context = bpy.context
scene = context.scene
#  reuse Red material
mat = bpy.data.materials.get("Red")
if mat is None:
    # create
    mat = bpy.data.materials.new(name="Red")
    mat.diffuse_color = (1, 0, 0)
    #tex = bpy.data.textures.new("red", 'IMAGE')
    #img = bpy.data.images.load("D:\\red.png")
    #tex.image = img
    #slot = mat.texture_slots.add()

mesh_objs = [o for o in scene.objects if o.type == 'MESH']

for mesh_obj in mesh_objs:
    mesh_obj.active_material = mat
    mesh = mesh_obj.data
    for face in mesh.polygons:
        face.material_index = mesh_obj.active_material_index