title: How to write on each iteration to a csv file
body: <p>How do i write to a csv file in each iteration one line.
  I would like to have this kind of behaviour.</p>
  
  <pre><code>import time
  import csv
  
  path = 'C:/Blender_Scripts/test.csv'
  for i in range(0,100):
      time.sleep(1)
      with open(path, 'a+', newline='') as Pt_file:
          Pt_writer = csv.writer(Pt_file)
          Pt_writer.writerow([i])
  </code></pre>
  
  <p>Is there a way to do this in a perfomance useful way?</p>