title: how to read and search for a keyword in an fts file?
body: <p>I'm writing a Python program that opens an fts file, searches for a keyword and prints the value next to it. For example, the program will search for "OBSERVER=" in the file and print out a name. </p>
  
  <p>I have gotten this to work successfully in a txt file but am having trouble with the fts file. </p>
  
  <pre><code>file = open("text.txt", "r")
  for line in file:
      if "OBSERVER=" in line:
          str = line.partition('\'')[-1].rpartition('\'')[0]
          print str
      if "IMAGETYP=" in line:
          str2 = line.partition('\'')[-1].rpartition('\'')[0]
          print str2
      if "READOUTM=" in line:
          str3 = line.partition('\'')[-1].rpartition('\'')[0] 
          print str3
  file.close()
  </code></pre>
  
  <p>What libraries must I use for python to be able to open, read, search and print the strings inside an fts file? </p>