Simple scripts to evenly space objects

I wrote simple scripts to evenly space objects.
Here is the link to the scripts and instructions:

If you take a look at the script, you may wonder why I am creating a wrapper and append it to the temporary list:

                          oWrapper = ObjWrapper()
                          oWrapper.ObjRef = obj
                          oWrapper.LocX = obj.LocX

            # sort the temp list using LocX

This is to sort the objects by LocX so that when you adjust the LocX of each object, the overall sequence of objects will be preserved along the axis after running the script.
In other words, an object with the smallest LocX will be the object with the minimum LocX, and another object with the second smallest LocX will be the object with the second smallest LocX after the script execution.


Thank you for the script. I will have a look at it: it is always interesting to see how other people tackle something