readline.parse_and_bind('"x": backward-char') will redefine x for command input to the python interpreter (and for the usage of input() and raw_input()) but not for the stdin.readline() function readline() behaves very much like a read() system call that is terminated by ^M(#10) instead of ^D. It seems to ignore any key binding to be established by
https://bugzilla.novell.com/show_bug.cgi?id=341462#c2
--- Comment #2 from Elmar Stellnberger (AT/K)