python - How to get armature from bone?
Python console. 

Bit of "educated guesswork" going on very little from question. I'll try and cover all bases here

Using python console, C = bpy.context 

The armature object has context, in pose mode

&gt;&gt;&gt; C.object
bpy.data.objects['Armature']

&gt;&gt;&gt; C.mode
'POSE'


The active pose bone

&gt;&gt;&gt; pb = C.active_pose_bone
&gt;&gt;&gt; pb
bpy.data.objects['Armature'].pose.bones["Bone"]


The pose bone belongs to the armature object which has context. Alternatively the id_data pointer tells us which ID object to which an object belongs. 

&gt;&gt;&gt; pb.id_data
bpy.data.objects['Armature']


The armature associated with this object.

&gt;&gt;&gt; pb.id_data.data
bpy.data.armatures['Armature']


It would be really handy if in future you posted some pertinent code.