How to add a displacement modifier and source image with blender python
The code is

heightTex = bpy.data.textures.new('Texture name', type = 'IMAGE')
heightTex.image = bpy.data.images['Myimage.jpg']
dispMod = ob.modifiers.new("Displace", type='DISPLACE')
dispMod.texture = heightTex