Why does my PyDriver only update on frame-change?
Don't use bpy.data.*** because blender won't know to create a dependancy between the objects (this is why updates are not working properly),

Instead:


add a driver variable with the button Add Variable.
select object ID type.
then enter "e1" as the object name.
the location channels X axis are default.




Now you can use the variable name defined by the driver variable in place of: bpy.data.objects["e1"].location.x.