title: writeline problem in python
body: <p>I have a very basic problem. I am learning my first steps with python &amp; scripting in general and so even this makes me wonder:</p>
  
  <p>I want to read &amp; write lines to new file:</p>
  
  <pre><code>ifile=open("C:\Python24\OtsakkeillaSPSS.csv", "r")
  ofile = open("C:\Python24\OtsakkeillaSPSSout.csv", "w")
  
  #read first line with headers
  line1 = ifile.readline()
  print line1
  
  #read following lines which contain data &amp; write it to ofile
  for line in ifile:
      if not line:
          break
      ofile.write(line)
  </code></pre>
  
  <p>if i print this to the screen i get all my lines done nicely:</p>
  
  <pre><code>0,26100,568,8636
  0,11130,555,**3570
  0,57100,77,2405**
  0,60120,116,1193
  0,33540,166,5007
  0,95420,318,2310
  0,20320,560,7607
  0,4300,692,3969
  0,65610,341,2073
  0,1720,0,0
  0,78850,228,1515
  0,78870,118,1222
  </code></pre>
  
  <p>If i write it to ofile i end up missing some 15 lines:</p>
  
  <pre><code>0,6100,948,8332
  0,26100,568,8636
  0,11130,555
  </code></pre>
  
  <p>I would appreciate if someone could point out to me what is it that i don´t understand?</p>
  
  <p>Reg, </p>
  
  <p>Jaani</p>