from maya.cmds import *
import math as ma
for u in range(0,2*pi*10):
for v in range(0,2*pi*10):
spaceLocator(p=(3*(1+ma.sin(v+u))+2*(1-ma.cos(v)/2),(4 + 2*(1-ma.cos(v)/2)*ma.cos(u)),-2*(1-ma.cos(v)/2)*ma.sin(u)),n='l_%d_%d' %(u, v))
i = getAttr('l_%d_%d' %(u, v)+'.localPositionX')
j = getAttr('l_%d_%d' %(u, v)+'.localPositionY')
k = getAttr('l_%d_%d' %(u, v)+'.localPositionZ')
polyCube(ax=(0,1,0))
setAttr('.t',i,j,k)