title: How to get byte offset in a file in python
body: <p>I am making a inverted index using hadoop and python. 
  I want to know how can I include the byte offset of a line/word in python.
  I need something like this</p>
  
  <pre><code>hello hello.txt@1124
  </code></pre>
  
  <p>I need the locations for making a full inverted index.
  Please help. </p>