How to parent two object without selecting them manually in blender python scripting console? I want parent object which stored in variable like
Add a cube at the origin:
a=bpy.ops.mesh.primitive_cube_add()
Create an empty object:
b=bpy.ops.object.empty_add(type="SPHERE")
How to parent a to b?