title: Python: AttributeError: 'str' object has no attribute 'readlines'
body: <p>I am trying to copy text from <code>mobileBuildSettings</code> and use it to replace text from <code>abproject</code>. I am getting the following error and I don't understand it.</p>
  
  <pre><code>AttributeError: 'str' object has no attribute 'readlines'
  </code></pre>
  
  <p>Below is my code:</p>
  
  <pre><code>with open("C:/abproject.build", "r+") as script, open ("C:/tempfile.build","w+") as newscript:
  abproject = ("C:/abproject.build")
  for line in abproject.readlines():
      if line == "@AppIdentifier@" :
          newabproject.write('"' + "AppIdentifier : " + '"' + appIdentifier.get() + '"' + "\n")
      else:
          newabproject.write(line)
  abproject.close()
  newabproject.close()
  os.remove("abproject.txt")
  os.remove("tempfile.buil","abproject.txt")
  </code></pre>