title: How to prompt a user to open a file in Python
body: <p>I'm using the following code to open a file based on the path set by the user, but am getting errors. Any suggestions?</p>
  
  <pre><code>f = raw_input("\n Hello, user. "
      "\n \n Please type in the path to your file and press 'Enter': ")
      file = open('f', 'r')
  </code></pre>
  
  <p>It says f is undefined or no such thing exists... even though I am defining it? Using 'r' to read the file.</p>