title: How  to know the byte position of a row of a CSV file in python?
body: <p>I'm operating with huge CSV files (20-25Mln rows) and don't want to split them into smaller pieces for a lot of reasons.</p>
  
  <p>My script reads a file row by row using <em>csv</em> module. I need to now a position (byte number) of the line which will be read on the next iteration (or which just was read).</p>
  
  <p>I tried</p>
  
  <pre><code>&gt;&gt;&gt; import csv
  &gt;&gt;&gt; f = open("uscompany.csv","rU")
  &gt;&gt;&gt; reader = csv.reader(f)
  &gt;&gt;&gt; reader.next()
  ....
  &gt;&gt;&gt; f.tell()
  8230
  </code></pre>
  
  <p>But it seems <em>csv</em> module reads the file by blocks. Since when I keep on iteration I get the same position</p>
  
  <pre><code>&gt;&gt;&gt; reader.next()
  ....
  &gt;&gt;&gt; f.tell()
  8230
  </code></pre>
  
  <p>Any suggestions? Please advice.</p>