New Armature API help?

Attempting to write a utility function do convert a nested dict of bones, into an armature.
This will eventualy be used to makethe BVH importer support bones.

This script works in that it creates 3 bones, but I cant edit the bones or even see them.
Any ideas?

from Blender import Scene, Armature, Object, Mathutils

def dict2armatre(armDict):
	'''Utility function that converts a dictionary to an armature
	the armDict dictionary is a nested dictionary of items described below.
	Each item is is a list formatted as follows.
	[childrenDict, start, end, Bone=None]
	* childrenDict is the child of the armDict.
	* start and end are vectors representing the armature space locations of the bones rest position.
	* Bone, starts off as None, but the 4th slot will havea bone added into it once the armature is created
	Dictionary keys are all strings that are used to name the bones.
	the example below shows 3 bones
	armdct= {'hip':[{'knee':[{}, (0,0,1), (0,0,2), None]}, (0,0,0), (0,0,1), None], 'vehicle':[{}, (1,0,0), (2,0,0), None]}
	..vehicle '''
	def item2bone(name, data, selfdata, parentdata):
		bone= selfdata[3]= Armature.Editbone() name
		data.bones[]= bone
		bone.head= Mathutils.Vector(selfdata[1])
		bone.tail= Mathutils.Vector(selfdata[2])
		if parentdata:
			bone.parent= parentdata[3]
		for childname, childdata in selfdata[0].iteritems():
			# Make bones recursivly
			item2bone(childname, data, childdata, selfdata)
	armOb= Object.New('Armature')
	armData= Armature.Armature('myArmature')
	for childname, rootbonedata in armDict.iteritems():
		item2bone(childname, armData, rootbonedata, None)
	return armOb

if __name__ == '__main__':
	armdct= {'hip':[{'knee':[{}, v(0,0,1), v(0,0,2), None]}, v(0,0,0), v(0,0,1), None], 'vehicle':[{}, v(1,0,0), v(2,0,0), None]}
	ob= dict2armatre(armdct)
	scn= Scene.GetCurrent()
	ob.sel= 1 

the script works for me.what do you mean I cant edit them.
I see three bones named hip,knee, and vehicle positioned
in the dict coords(first vector for head and second for tail)…

Yeap, it works for me also… And thanks for this eg. of armature creation!

Just Checked and its a bug in the latest CVS!. Sorry Guys.

hey is this fixed for importing armatures from empties? I have wanting to work with some motion capture data. Currently I have been getting the data in the empties move right but the armatures freeze into postion and then the whole rig is moved only by the hips.
2nd where should I start for learning python?