Open brendon-boldt opened 4 months ago
I only see import readline
but the module is not being used anywhere. Is this PR missing some commits?
It's not a mistake, and it confused me at first too. I cannot find any documentation, but just importing the module gives you some of the nice features (for me backspace and up/down for command history) for Python's input()
function. It could just be a quirk of my system, but it is pretty easy to test by running python -c 'input(); input()'
and comparing it to python -c 'import readline; input(); input()'
(double input()
gives you a chance to check command history support).
This should add command history and some basic readline commands to the main command line prompt. I have tested this on my Linux system with CPython and Pypy (NixOS, specifically).