Procedurally creating a simple armature

There are some sniplets on the forum how this could be done:
Using GeomVertexWriter: www.panda3d.org/forums/viewtopic.php?f=1&t=10579
Using the egg interface: www.panda3d.org/forums/viewtopic.php?f=4&t=5169