Use range instead of xrange in python geometry module