title: input working in shell but not terminal
body: <p>I have:</p>
  
  <pre><code>filename = input()
  with open(filename) as file:
      print('It opened.')
  </code></pre>
  
  <p>saved on my desktop as "test.py".</p>
  
  <p>I run it from the terminal, and get:</p>
  
  <pre><code>blahblahblah:~ rickyd$ python /users/rickyd/desktop/test.py
  /users/rickyd/desktop/tryme.txt
  Traceback (most recent call last):
    File "/users/rickyd/desktop/test.py", line 1, in &lt;module&gt;
      filename = input()
    File "&lt;string&gt;", line 1
      /users/rickyd/desktop/tryme.txt
      ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>When I run it in the shell, it works perfectly:</p>
  
  <pre><code>&gt;&gt;&gt; ================================ RESTART ================================
  &gt;&gt;&gt; 
  /users/rickyd/desktop/tryme.txt
  It opened.
  &gt;&gt;&gt; 
  </code></pre>
  
  <p>Why isn't it working in the terminal?</p>
  
  <p>Is there any way to make sure that (at least for code not explicitly designed to do otherwise)
  the shell and the terminal will give the same behavior, so I won't have to check both separately?</p>