No command history in Python REPL when using with Cygwin under Windows 7

一笑奈何 提交于 2019-12-13 03:01:36

问题


I am running Python v3.6.4 under Windows 7. My problem is that when I log into the Python repl (command line interpreter) from Cygwin I lose the history feature of Python. The up and down arrows dont show me the command history but actually move my cursor up and down the screen. When I try the same using the Windows Terminal (CMD) the behaviour is different - I can access the full Python command history. This CMD behaviour is preferable when writing blocks of Python code in the repl especially when you make a typo and need to re-enter the block.

Below are two screen shots showing this difference in behaviour. The first example shows the cursor is re-positioned up the screen. The second example shows the last command is retrieved which I can then use to edit

example of REPL under Cygwin - up arrow moves cursor up screen example of REPL under Windows Terminal (CMD) - up arrow retrieves last command history

I stumbled across a similar issue Python pdb command history not working on Windows and tried the suggested solution of re-installing Python but it didnt solve my issue.

来源:https://stackoverflow.com/questions/48764584/no-command-history-in-python-repl-when-using-with-cygwin-under-windows-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!