Scaling cubes with individual origins in python api 2.82
Python api is not executing the resizing with individual origins, like when the same operation is done with the cursor. I change the transform pivot point to individual origins but the script is only scaling the cubes from median centers, so the cubes are moving away. I need them to scale from individual origins so at one poing they merge together. Any idea how to make this work with python api, or if this a bug. It seems like a really basic operation. 

The code:

import bpy
bpy.context.scene.tool_settings.transform_pivot_point = 'INDIVIDUAL_ORIGINS'
bpy.ops.mesh.primitive_cube_add(enter_editmode=False, location=(0, 0, 0))
bpy.ops.mesh.primitive_cube_add(enter_editmode=False, location=(3, 0, 0))
bpy.ops.object.select_all(action='SELECT')
bpy.ops.transform.resize(value=(1.77118, 1.77118, 1.77118))
Avoid ops for easy operations.

IMO many ops are a bridge between the user and the UI. For simple operations it is often simpler to set property values directly.

After the op cube has context. cube = context.object  . 

bpy.ops.mesh.primitive_cube_add()
cube = context.object


To uniformly scale about the origin  

cube.scale *= 1.7718


Alternatively can set size in the operator

bpy.ops.mesh.primitive_cube_add(size=2 * 1.7718)


which will "apply" the scale.

Finally: To have the two cubes only touching use 1.5