How to set bone rotation in Python script by an absolute value?
Your problem was using the edit bones, not pose bones.

A function I used was like the following:

set_rotation(ob, bone_name, rot, axis='X'):
     mat_rot = mathutils.Matrix.Rotation(radians(rot), 4, axis)
     bone = ob.pose.bones[bone_name]
     bone.matrix = mat_rot


This has the added benefit of using a quaternion I believe. I will need to look into that. axis can also be a Vector.