save error with embedded python 2.5

Eric_Dexter at msn.com Eric_Dexter at msn.com
Fri Apr 10 08:40:11 EDT 2009


I seem to be getting one extra value when I create my values with

for yy in range(1, maxy):
          for xx in range(1, maxx):
            count = count + 1
            #squaret.append[count]
            squaret.append( square(xx * 20, yy * 20))

and saving boxes with

if squaresave.state == '1':
          outfile = open('grid.dat','w')
          count = 0
          for s in squaret:
            count = count + 1
            outfile.write(s.state)
            outfile.write(' ')
            if count == maxy:
              outfile.write('\n')
              count = 0

thanks for any help in advance

I am using python 2.5 embeded into pycap..  the rest of the source is
available at
http://dexrowem.blogspot.com/2009/04/pycap-drum-machine-or-piano-roll-beta.html
if needed..



More information about the Python-list mailing list