Selecting a bone in pose mode by code

Hello,

I didn’t manage to select a specific bone in pose mode by code, in order to scale/rotate it (with bpy.ops.transform.rotate…)

Does anyone know how to do that?

Thanks