You can either read the keyframe points of fcurves, or evalute fcurves at any desired frame (even subframe):
import bpy
ob = bpy.context.object
if ob is not None:
if ob.animation_data is not None and ob.animation_data.action is not None:
action = ob.animation_data.action
print()
print("Keyframes")
print("---------")
for fcu in action.fcurves:
print()
print(fcu.data_path, fcu.array_index)
for kp in fcu.keyframe_points:
print(" Frame %s: %s" % (kp.co[:]))
print()
print("Frames")
print("------")
for fcu in action.fcurves:
print()
print(fcu.data_path, fcu.array_index)
for i in range(1, 6):
print(" Frame %i: %.6f" % (i, fcu.evaluate(i)))