When running python (3.6.7) interactively in a bash shell (cygwin 64 bit 4.4.12(3)-release) on a Windows 10 machine, I recently noticed that the up and down arrows to scroll thru command line history stop working. It's not that they don't work at all, they stop working after having worked in the same session. This seems to have happened in the last few weeks, and might have been coincident with applying windows updates. I can reproduce the issue by doing the following:
>>> x=3
>>> print(x)
3
>>> print(x) # This was me doing an up arrow
3
>>> help(x)
...
# The help for int prints to the screen
>>> ^[[A # This is me doing an up arrow again
There is a similar question here: Seeing escape characters when pressing the arrow keys in python shell But that is not on Windows and sounded like it happened all the time. Thanks for any help or suggestions.
Things I have tried since I opened this ticket that have not fixed the problem:
- Installed pyreadline. The behavior changed with pyreadline, but still wasn't good. Up-arrow deleted half the text on the screen and put the cursor somewhere in the middle of the window.
- Upgraded python to 3.6.8.
- Reinstalled bash