I'd like to have a line between two moving object woth python.
For example if i have two cylinders:
[![enter image description here][1]][1]
I want that light blue line between the two 3D object (it could be a cylinder also). It has tree parts: 
 1. and 2. there are one-one shorter line which come from the side of the cylinders(not from the top or the bottom), and the other ends which are marked with red arrows, 'point' to the other object.
From the top view:
[![enter image description here][2]][2]
 3. the third part is connecting these point.
And if i move these objects, or rotate them, i whould like to have the line with the same features:
[![enter image description here][3]][3]
I would like to add the line from python.
I've tried many things, but couldnt solve the problem yet.
Thank you in advance for any help.



  [1]: https://i.sstatic.net/GD5D2.jpg
  [2]: https://i.sstatic.net/S8GHc.jpg
  [3]: https://i.sstatic.net/szXjH.jpg