title: Syntax error in reading text file
body: <p>I'm having trouble in getting the following code to run, (it's exercise 15 from Zed Shaw's "Learn Python the hard way"):</p>
  
  <pre><code>from sys import argv
  
  script, filename = argv
  
  txt = open(filename)
  
  print "Here's your file %r." % filename print txt.read()
  
  print "Type the filename again: " file_again = raw_input("==&gt;")
  
  txt_again = open(file_again)
  
  print txt_again.read()
  
  txt.close() txt_again.close()
  </code></pre>
  
  <p>I try to run it from the terminal and get the following:</p>
  
  <pre><code>dominics-macbook-4:MyPython Dom$ python ex15_sample.txt
    File "ex15_sample.txt", line 1
      This is stuff I typed into a file.
                    ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>Here's the contents of ex15_sample.txt:</p>
  
  <pre><code>"This is stuff I typed into a file.
  It is really cool stuff.
  Lots and lots of fun to have in here."
  </code></pre>
  
  <p>I'm banging my head off the wall! (Python 2.6.1, OS X 10.6.8)</p>