This project has moved and is read-only. For the latest updates, please go here.


Ctrl-A,Ctrl-E/E doesn't send code from Editor to the Interactive window


Two issues:
  • Ctrl-A, Ctrl-E/E only sends the first line of the code to the interactive window
  • If you have both Python 3.4 and 2.7 and has 2.7 set as your default, Ctrl-A, Ctrl-E/E sends the code to the 3.4 window.
  • VS2013 Ult + Update 3 RTM
  • PTVS 2.1 RC
  • Azure SDK 2.4
To Repro:
  • Install Azure SDK for Python for Python 3.4
  • Install Anaconda 2.0.0 x86-64 so you get IPython, Matplotlib, etc. packages
  • If you want to follow the full steps I did, follow the tutorial for "Using the IPython REPL with PTVS" on CodePlex. You don't have to to reproduce this issue however
  • In VS under Tools->Options->Python Tools->Interactive Windows, set Interactive Mode to IPython
  • In the Python Environments window, set Python 64-bit 2.7 as the Default.
  • In the Python 64-bit 2.7 Interactive window, type ipython --pylab to start ipython.
  • Try the following code to make sure the REPL works as expected:
    x = linspace(0,5,10)
    y = x**2
    plot(x, y, 'r')
    You should see an embedded graph
  • Find a chunk of Python code (there is one in the tutorial mentioned above), and copy it to a new .py file in VS.
  • With the focus in the editor, Ctrl-A, Ctrl-E/E to send the code to the REPL window
The first line of the code is sent to the Python 3.4 Interactive window, followed by the following message:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'mpl_toolkits'
Closed Sep 5, 2014 at 8:03 PM by jinglou
Verified the fixes in build 20905.03 and both issues have been fixed and worked as expected. Closing.


jinglou wrote Aug 13, 2014 at 1:44 AM

If I have the .py file in a solution/project, Ctrl-A, Ctrl-E/E worked as expected. Only when the file is not associated with a project had the issue. Lower the IMPACT to low.