# get position of object following a path via script

I have an object obj following a path, and when I run obj.location, it always returns the same value for every frame even though it's moving. How can I get the real position?

context.scene.frame_set(f)