Question

python console tab completion not working in windows

running Windows 10

From what I understand python3 has tab completion in the python console already built in but this isn't working for me.

When I hit tab there is no completion:

enter image description here

Im aware there are modules that can do this, but I'd like to use the native feature if it is available to me on windows.

 46  20725  46
1 Jan 1970

Solution

 61

The builtin completion relies on the GNU readline library.

You may be able to get completion working by installing the python version (pyreadline) of this package on Windows.

python -m pip install pyreadline

Edit: For more recent Python releases, see Craig McQueen's comment below. ie. pyreadline3 instead of pyreadline

2017-10-26

Solution

 31

The original pyreadline is no longer maintained and doesn't work on newer versions of Python (>=3.10). Installing pyreadline3 works:

python -m pip install pyreadline3
2022-02-19