Loop cut and slide using python script in blender
I found the answer, the way it is done is:

old_type = bpy.context.area.type
bpy.ops.object.mode_set(mode='EDIT')
bpy.context.area.type = 'VIEW_3D'

bpy.ops.mesh.loopcut_slide(MESH_OT_loopcut={"number_cuts":10, "smoothness":0, "falloff":'ROOT', "edge_index":1})
bpy.ops.mesh.loopcut_slide(MESH_OT_loopcut={"number_cuts":10, "smoothness":0, "falloff":'ROOT', "edge_index":0})
bpy.context.area.type = old_type 


So you should be in edit mode, and VIEW_3D context, then use the loop cut to cut the edge "edge_index"