I'd discourage use of pyreadline
where possible, as it was written to support IPython, and stopped active development when IPython stopped using readline
/pyreadline
to support their REPL.
As an alternative, I'd suggest IPython itself; it implements their own tab-completion features (using prompt_toolkit
as of 5.0) that work in a terminal agnostic fashion. If you install and use ipython
, you'll get tab completion and the host of other features it provides to improve the interactive experience. Using the py.exe
manager application bundled with modern Python, install it for Python 3 (in an admin elevated command prompt if Python installed for all users) with:
py -3 -mpip install ipython
then to run it:
py -3 -mIPython
If you don't want the whole of ipython
just to get these features, the prompt_toolkit
folks do provide a minimalist ptpython
REPL that is basically "Python with a REPL provided by prompt_toolkit
" without all the other IPython bells and whistles.