title: Read line by line using timer
body: <p>I am trying to read each line by specific interval using python timer from a txt file 
  But it read first line only and it shows continuously </p>
  
  <p>my code is </p>
  
  <pre><code>def read():
      try:
          while True:
              fo = open("foo.txt", "r")
              threading.Timer(1.0, read).start()
              line=fo.readline()
              print line
              if len(line)==0:
                  break
      except:
          pass
  read()
  </code></pre>