Assigning Texture for Preview

I’ve got a script that assigns multiple texture to different slots, and it renders great, but when I change the viewport shading to “Textured”, it shows as white. I’ve been browsing through the Blender 2.5 API documentation to try and find a way to assign the preview texture to the object, but can’t for the life of me find anything that looks right.

Does anyone know how to assign an image to be used in the preview?