Setting a Target Object for a constraint is fairly straight forward:
path = bpy.data.objects["Nurbspath"]
bpy.data.objects["Armature"].pose.bones["Bone"].constraints["Follow Path"].target = path
I'm still very new to this and I can't figure out how to do the same thing for a driver. Specifically I would like to be able to set a the Target Object for a specific variable of a specific Driver from the console. I think it would go something like this:
path = bpy.data.objects["NurbsPath"]
bpy.data.objects["Armature"].animation_data.drivers.driver.driver.variables.var["var"].targets.driver_target.ID = path
But as far as I can tell drivers don't have names so how does one specify them?
The python tooltip isn't particularly helpful either...
bpy.data.objects["Armature"] ... id
Thanks for your assistance.