As part of my ongoing experiments involving Constraints, I present you this little demo.Video Tutorials, HowTo, Tips and Tricks
I used "Limit Distance" constraint on four spheres that you see moving around in the video. The Distance value for the constraint is the value of the bounding box dimensions of the sphere object.
The following snippet of code enabled me to toggle limit_mode of Limit Distance constraints for the three blue colored spheres in one go
Onto the video then...
satishgoda at gmail dot com