Python Scale UV islands by individual origins
you must select all uv island before scale it:
import bpy
scale_length= 0.5
scale_width = 0.7

original_type = bpy.context.area.ui_type
bpy.context.area.ui_type = 'UV'
bpy.ops.uv.select_all(action='SELECT')
bpy.context.space_data.pivot_point = 'INDIVIDUAL_ORIGINS'
bpy.ops.transform.resize(value=(scale_length, scale_width, 1))


bpy.context.area.ui_type = original_type