Hacker News new | ask | show | jobs
by kbd 2528 days ago
> when I do, it's a regrettable experience--can't use up arrow to get previous command, can't use arrow keys to move cursor

Dunno what's wrong with your readline but what you describe is default Python behavior. Try installing ipython, you'll get all that and more (such as syntax highlighting, multi-line editing, and much more).

1 comments

Yeah, I'm not sure why, but this happens in VS Code's integrated terminal, which also has other readline-related issues (alt+backspace deletes to the previous space instead of deleting the previous word, for example). In any case, I still don't use the REPL except when I need to dynamically inspect some value (which isn't necessary in Go, since it's statically typed).
Windows is crippled somewhat on that front, but there are workarounds. Often easier and way more functional to just install a wrapper like ptpython, bpython, ipython, etc.
I'm using a Mac.
Sounds like a broken terminal configuration. Try running python at the standard terminal and see what it does.
Yeah, like I said, it works at a standard terminal, not in the VS Code integrated terminal.