Python: How to get object's true length?
You can use the below script to get the dimensions of the selected object:

x = bpy.context.object.dimensions[0]
y = bpy.context.object.dimensions[1]
z = bpy.context.object.dimensions[2]


which is controlled from the 3d view as shown below: