problem using getParentBoneName()

Hi all! I’m trying to write a script that will output the hierarchy of a scene’s objects to a text file. I’m interested in capturing all of the parent/children relationships in the scene.

The Object class’ getParent() works great. However, when I parent an Armature bone to, say, a cube, I’d like for my script to figure out the specific bone name that is the parent of the cube and not just “Armature.001”. The description of getParentBoneName() is exactly what I need, but I get an error message when I run this code:

################################
import Blender
from Blender import Scene
from Blender import Object

sceneObjs = Object.Get()

for obj in sceneObjs:
if obj.getParent() != None:
print obj.getParentBoneName()
#################################

And the error message is: “AttributeType: getParentBoneName”

(Note: For my test scene, I only have a single cube and an armature with one bone only. The bone is the parent to the cube.)

Has anyone tried using this method and had similar problems? Thanks for any advice that you may be able to offer.