How to get bone rotation?

I need to get the rotation of a specific bone of an armature for each frame of my animation. Or the rotation of the object that moves with it.
I tried a lot of things, but none did actually work.

Kind of new to python programming in Blender and learning as I go along, but it is a deep plonge in the armature and objects sea… A hint or direction would be nice!

Found out that posebone can give me the rotation of the bone.:
##############
import Blender
import bpy
from Blender import Mathutils
from Blender import *

#armature has a name aName and your bone of interest is bName
def RotateBone(aName,bName):
ob = bpy.data.objects[aName]
ob.select(1)
pose = ob.getPose()

posebone = pose.bones[bName]
quat = posebone.quat

eu = Mathutils.Euler(quat.toEuler())
print eu

RotateBone(“Arm”,“Bone”)
####################
But that stops working when I add a IK solver constraint…
Someone knows what solves that? Or where I can find the right information?

IK solver suppress manual bone rotations or those set via a python script. It has kind of a higher priority when conlicts in Blender exists. I.e. calculations of IK solver are finally used by Blender notwithstanding your own set-up values. Thus, you need to judge if give control of an IK solver over an armature or part of it OR control the bones yourself (via a script or manually). I think there is no other alternative.

Regards,