texture mapping on a blender object using python script

Hi everybody,

I am very new to blender and python.
What I would like to do is mapping of an image file (BMP, JPG, etc.) on a blender object using python script.
I know how to map texture on an object from blender window but I would liek to accomplish this using python script.
It seems blender Image module provides limited functionalities and I guess I can use PIL but have no idea how to use that library.
Can somebody guide me the required steps for that?

May be of interest:

http://ash.webpark.sk/uvmap_eng.htm

%<