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

IPython interpreter?

Jul 27, 2013 at 8:21 PM
I am running the Preview 2013 version of PTVS. The Interactive Window is set to IPython and is working fine. However, when I click on the green Start arrow button the interpreter that runs is not IPython: it is the standard Python interpreter. The problem with this interpreter is that each time a chart is generated it appears in a separate window that has to be closed before execution can proceed. This does not happen in IPython. Is there a way to configure PTVS so that it runs on IPython when one clicks on the Start button?
Jul 27, 2013 at 11:03 PM
Edited Jul 27, 2013 at 11:08 PM
a few things:
  • make sure you have installed IPython
  • when you hit the green (run) button, images always display in a separate window
  • if you have "wait for input when process exits normally" checked, you can disable it to save one click: Tools/Options/Python Tools/Advanced
  • bring up the interactive window for your interpreter (Ctrl-K-backtick), and click on the Interactive Window link (or Alt-I) & make sure it's IPython
  • now you can:
    • directly enter your figure code in the IPython REPL or
    • from the Editor window, select your text (Ctrl-A), and then send it to the IPython REPL (Ctrl-E-E)
In summary: from Editor you get pop-outs, from IPython you get inline images. the Interactive Options also has an IPython with and without Pylab option.

NOTE: there are a number of small issues w displaying images that have been fixed & will be available in 2.0 RC in late august. specifically 1) resizing images & scrolling 2) groups of commands to create a figure being executed one line at a time instead of as group (which causes partial images after each stmt).
Jul 27, 2013 at 11:20 PM
I believe the IPython documentation (or maybe it's matplotlib's) has a section on the difference between writing a script and using an interactive prompt. These apply here as well - F5/Start button are running the script. Send to Interactive is the command you probably want.