python obtaing location along a path ?? problems

Doing some basic python stuff in Blender

I was just checking to see that i could assign a camera to a path and watch it move fine that works ok , I just created a path and a cube and made the cube parent to the path

though my problems concerns when i try to get the location of the camera as it moves in the animation

my code looks something like this

import Blender
from Blender import *

CAM = Blender.Object.Get(‘Camera’)

print CAM.LocX
print CAM.LocY

Nothing too complicated in that thought, when i ran it all i get is the original location of the camera prior to the animation beginning

How can i get back the location of the camera while it is being animation by a path curve

youll need to get the worldspace location
ob.getLocation(‘worldspace’)

So,
Would the correct syntax look like this?


ob = Blender.Object.Get('Camera')
CAM = ob.getLocation('worldspace')

print CAM.LocX
print CAM.LocY

If I’m not mistaken it would be more like:


ob = Blender.Object.Get('Camera')
CAM = ob.getLocation('worldspace')

print CAM[0] #x-location
print CAM[1] #y-location