diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index f966190ea6d..e593ea93ff4 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -3528,11 +3528,13 @@ eventually provide a shell." (defconst python-shell-setup-code "\ try: - import tty + import termios except ImportError: pass else: - tty.setraw(0)" + attr = termios.tcgetattr(0) + attr[3] &= ~termios.ECHO + termios.tcsetattr(0, termios.TCSADRAIN, attr)" "Code used to setup the inferior Python processes.") (defconst python-shell-eval-setup-code