Position armature bone's head and tail

I can create chain of bones like following …

bpy.ops.object.armature_add(enter_editmode=True, location=(0,0,1))


I wanted to know how to change the position of the bones tails so that I can create the chain shape I want.
If I change the position of the head and tail of the bone, below is the output in the debug window. But it does not tell me how to select either the head or the tail.

bpy.ops.transform.translate(value=(0.10286, 0, 0), constraint_axis=(True, False, False), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1, release_confirm=True)

Any help would be appreciated.

You should avoid operators as much as possible. It will make it much easier to create your armature with RNA methods, see e.g.


Thanks @CoDEmanX!

Would you know any such example where tracked constraints are used.