title: Reading data in .txt file excluding header and footers
body: <p>I have a .txt file that looks like:</p>
  
  <pre><code>abcd this is the header
  more header, nothing here I need
  ***********
  column1    column2
  =========  =========
    12.4       A
    34.6       mm
    1.3        um
  =====================
  footer, nothing that I need here
  ***** more text ******
  </code></pre>
  
  <p>I am trying to read the data in the columns, each into it's own list, col1 = [12.4, 34.6, 1.3] and col2 = ['A', 'mm', 'um'].</p>
  
  <p>This is what I have so far, but the only thing that is returned when I run the code is 'None':</p>
  
  <pre><code>def readfile():
      y = sys.argv[1]
  
      z = open(y)
      for line in z:
  
          data = False
          if data == True:
              toks = line.split()
              print toks
  
          if line.startswith('=========  ========='):
              data = True
              continue
  
          if line.startswith('====================='):
              data = False
              break
  print readfile()
  </code></pre>
  
  <p>Any suggestions? </p>