How to determine the angles between bones using a Python Script?
The angle between two vectors.

For example sake the triangle ABC is the three points in space A, B and C. where  B and C are the head and tail of the active pose bone  (context.active_pose_bone).  

The point B is the mid point of head and tail of bone named "Bone". (Edit to match your bones name)

Will use mathutils.Vector.angle(vector) to calculate the angle.

import bpy
from math import degrees
context = bpy.context
ob = context.object
# middle of thigh
tb = ob.pose.bones.get("Bone")
B = (tb.head + tb.tail) / 2

# the active pose bone
pb = context.active_pose_bone

A = pb.head
C = pb.tail

# angle AB BC
alpha = (A - B).angle(C - B)
print(degrees(alpha))