How to subtract child location from parent location?

Hi everybody. I need to get the offset value between child and parent locations of the selected objects. How can this be done?

Cheers,
n1k

PS

In fact I just needed local coordinates. Problem solved :slight_smile:

for o in bpy.context.selected_objects:
print(o.matrix_local.translation)