1

In the integrated Power Shell terminal in VSCode in Windows 10, I can type a command, and then re-type it again at the prompt by pressing the up arrow key.

How do I get the same behavior in the integrated anaconda Python console?

This is a related question, though not applicable to the Python console.

Here are the steps to replicate the issue:

  1. Launch Anaconda Navigator, and select vscode
  2. Open .py file in vscode
  3. Run file ctrl + shift +F
  4. Go to terminal. At prompt enter python

PS C:\Users\Fred\Desktop\pandas> python Python 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.
>>>

  1. At python prompt enter 2+2 + enter
  2. At python prompt enter up up arrow. Nthing happens. Expected to get last command 2+2.
Fred
  • 1,833
  • 3
  • 24
  • 29
  • What do you mean by "anaconda Python console"? Do you mean the REPL from Python or IPython from the integrated terminal in VS Code? – Brett Cannon May 03 '18 at 19:47
  • Please see updated question. I am new so not sure what you mean. Hope above helps. Thanks! – Fred May 03 '18 at 21:00

1 Answers1

0

Neither the Python extension or VS Code play any part in that. Instead, it has to do with what Anaconda provides with their Python interpreters (i.e. they must not be including readline).

I would give ipython a try and see if that does what you are after.

Brett Cannon
  • 14,438
  • 3
  • 45
  • 40