Adding import readline
to the source code affects builtin functions (like input()
and raw_input()
) enabling GNU readline, history and all that arrow stuff. I wonder, is there any way to undo it?
P.S. "Solutions" like del readline
and from __builtins__ import raw_input
don't work. You can try python2 -c "raw_input(); import readline; raw_input(); del readline; raw_input()"
to check it.