title: Writting a file with multiple images in a grid
body: <p>I'm trying to write a file with multiple images (100) in a 10x10 grid. I use 3 for iterations to: </p>
  
  <p>-open the file
  -set coordinates (i,j)</p>
  
  <p>The problem is when I look my file, all I can see is the last image multiple times. Maybe the files is overwrite every time that the program enters the for loop. Until now I can't find a solution.</p>
  
  <p>The code is:</p>
  
  <pre><code>    import Image
  
      from os import listdir
      from os.path import isfile, join
      files = [ f for f in listdir("/mnt/hgfs/Documents/Notebooks/test1/") if isfile(join("/mnt/hgfs/Documents/Notebooks/test1/", f)) ]
  
      new_im = Image.new('RGB', (3000,3000))
  
      for i in xrange(0,3000,300):
          for j in xrange(0,3000,300):
              for ima in files:
                  #paste the image at location i,j:
                  im = Image.open(ima)
                  im.thumbnail((300,300))
                  new_im.paste(im, (i,j))
  
      new_im.save("hola.png")
  </code></pre>
  
  <p>Thanks!</p>