First note that bones have two representations within blender, the
EditBone data represents it's static rest position within the armature while the
PoseBone is the animated bone data that you would be moving around. The edit bones are stored in
obj.data.edit_bones while the pose bones are in
rotation_mode value of a pose bone is used to switch between using
rotation_quaternion. These three rotation values can be seen in the bones properties and will show values without any constraints being applied. Note that euler values are stored as radians so you may want to use
math.degrees() for the display value. Also the W in axis angle is radians.
The pose bones
matrix value should give you the world position of the bone after constraints and drivers have been applied. You can get the bones euler rotation with
bone.matrix.to_euler(). If using
bpy.context to get the bone, you will find that
bpy.context.active_bone.matrix will give you a matrix of zeros and ones while
bpy.context.active_pose_bone.matrix will give you the matrix that you are after.
You can use a panel to watch the rotation of a bone -
from math import degrees
bl_label = "Bone Angles"
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
def draw(self, context):
arm = context.scene.objects['Armature']
bone = arm.pose.bones['Bone']
mat = bone.matrix.to_euler()
row = self.layout.row()