Update function?

Hi, i have been working on a script, i can resume the problem in this code:


import bpy

for t in range(10):
    
    obj = bpy.data.objects["Disc"]
    obj.select = True

    bpy.context.scene.frame_current = t
    disc = bpy.data.objects["Disc"]
    print(disc.rotation_euler[2])

“Disc” is an animated object (270 grades in 90 frames in the Z axis), it should print the angle of the Disc in the time, but it shows the same number always :S
I don’t know if this is a Blender bug or if I’m missing an Update function or something.

Before “print” :

bpy.context.scene.update()

???

Use bpy.context.scene.frame_set(), frame_current is kind of buggy.

Wow, thank you very much.
I’m working in some mechanisms in Blender, I will post them later.
Thanks again.