reading motion works in console but not in script


I’m currently trying to export motion in 2.5. It seems I’m doing it wrong though.

If I enter this script line by line in the interactive python console (which I love by the way) it works just fine, but if I run it as a script it always prints the location at frame 0… :confused:

import bpy

bpy.context.scene.frame_current = 0
bpy.context.scene.frame_current = 1

Setting the location works this way though… I’m confused.

Any help is appreciated,
Mr. Wonko