# stack of spheres
# basic_file_handling.py
# Opening and writing to a text file
  
def cheestuff(path, numSpheres, startRad, endRad):
    
    fileid = open(path, 'w')
    shift = 0
  
    increment = (startRad - endRad) / numSpheres
  
    radSphere = startRad
    
    
    
    for n in range(numSpheres, 0, -1):
        fileid.write("sphere -r %s;\n" % radSphere )
        fileid.write("xform -t 0 %s 0;\n" % (radSphere+(shift*2)))
        shift = shift + radSphere
        radSphere = radSphere - increment
    fileid.close()
    
    
cheestuff("/stuhome/vsfx705/python/Stest.mel", 10, 5.4, 1.3)