you have to remember about object space and world space. If you use that getAttr command on the vertex pos you may not always get the worldspace position.
So I would use the xform command (believe me it's your new best friend!) so I would use
string $obj = "myObject";
float $pos[] = `xform -q -ws -t ($obj + ".vtx[0]")`;
now you can use the array to access the postions:
print("pos: " + $pos[0] + " " + $pos[1] + " " + $pos[2]);
That's about it really
Alan
Technical Director - Framestore
Currently working on: Your Highness
IMDB