Get the location in world coordinates of a bone's head and tail while in pose mode
This simple script will print to the console and move two Empties to the location of the active bone in pose mode (last selected).

import bpy
from bpy import context

armature = "Armature" # change this to the name of your armature 

tail = bpy.data.objects[armature].location + context.active_pose_bone.tail
head = bpy.data.objects[armature].location + context.active_pose_bone.head

print(tail, head)
bpy.data.objects['Empty.head'].location = head
bpy.data.objects['Empty.tail'].location = tail


You will need to have two empties in your scene and on a visible layer, named Empty.tail and Empty.head in order for lines 10 and 11 to work. If not comment out lines 10 and 11 with a #.

Lines 6 and 7 get the locations of the armature and the active bone's head and tail, then adds them together. bpy.data.objects[armature] accesses an object with the name specified in the variable armature. If your armature has a different name, change it in the variable defined on line 4.

Line 9 print(tail, head) just spits the two vectors to the console.

Lines 10 and 11 sets the location of the two named empties to the location of the head and tail of the bone. I found this way easier then copying numbers from the console.

Note that you need to be in pose mode for this to work. Also the armature can got be rotated or scaled in object mode.