If "readline" is imported, "input" gets "readline" capabilities. It also loses the ability to import control characters. It doesn't matter where "readline" is imported; an import in some library module can trigger this. You can try this with a simple test case:
print(repr(input())) as a .py file, run in a console. Try typing "aaaESCbbb". On Windows 7, output is "bbb". On Linux, it's "aaa\x1bbbb". So it looks like "readline" is implicitly imported on Windows. I have a multi-threaded Python program which recognizes ESC as a command to stop something. This works on Linux, but not on Windows. Apparently something in Windows land pulls in "readline". What's the best way to get input from the console (not any enclosing shell script) that's cross-platform, cross-version (Python 2.7, 3.x), and doesn't do "readline" processing? (No, I don't want to use signals, a GUI, etc. This is simulating a serial input device while logging messages appear. It's a debug facility to be able to type input in the console window.) John Nagle -- https://mail.python.org/mailman/listinfo/python-list