[attach]10555[/attach]
for u in range(0,2*ma.pi*10):
for v in range(0,2*ma.pi*10):
cmds.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 = cmds.getAttr('l_%d_%d' %(u, v)+'.localPositionX')
j = cmds.getAttr('l_%d_%d' %(u, v)+'.localPositionY')
k = cmds.getAttr('l_%d_%d' %(u, v)+'.localPositionZ')
cmds.polyCube(ax=(0,1,0))
cmds.setAttr('.t',i,j,k)