title: Python "with statement" works in console, but not in Ubuntu terminal
body: <p><strong>In a Spyder iPython console:</strong></p>
  
  <pre><code>print(sys.version)
  3.6.1 |Anaconda 4.4.0 (64-bit)| (default, May 11 2017, 13:09:58) 
  [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
  </code></pre>
  
  <p><strong>and in a Ubuntu GNOME terminal 3.18.3:</strong></p>
  
  <pre><code>rappleto:~$ python
  Python 3.6.1 |Anaconda 4.4.0 (64-bit)| (default, May 11 2017, 13:09:58) 
  [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
  </code></pre>
  
  <p><em>so identical versions and builds of Python</em></p>
  
  <p><strong>In Spyder:</strong></p>
  
  <pre><code>In [4]: with open("pid.cpp") as pidcpp:
     ...:     data=pidcpp.read()
     ...: print(data)
     ...: 
  // pid.cpp - author: rappleto
  #include &lt;PID_v1.h&gt;
  ...
  </code></pre>
  
  <p><strong>in terminal:</strong></p>
  
  <pre><code>&gt;&gt;&gt; with open("pid.cpp") as pidcpp:
  ...     data=pidcpp.read()
  ... print(data)
    File "&lt;stdin&gt;", line 3
      print(data)
          ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>Is there some special way to end a "with" statement in the terminal?</p>