When Python is compiled with readline, repeatedly pressing <TAB> key in repl breaks the repl prompt.
Below is what I see when I hit <TAB> 4 times.
yury@ysmac ~/dev/py/cpython $ ./python.exe
Python 3.5.0+ (3.5:4ae62ddf7bc7+, Nov 18 2015, 14:52:57)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.1.76)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>>
>>>
Reproducible when Python is built from source on latest OS X. Works OK when installed from MacPorts.
Further, if I add
PyOS_ReadlineFunctionPointer = PyOS_StdioReadline;
in PyOS_Readline in myreadline.c, everything works as expected, so I think this is a readline bug. |