Disable echo back instead of setting tty to raw in Inferior Python

* lisp/progmodes/python.el (python-shell-setup-code): Change the
Python setup code.  (Bug#76943)
This commit is contained in:
kobarity 2025-03-20 19:03:33 +09:00 committed by Mattias Engdegård
parent 1e4ce13603
commit 4c5c20ddc2

View file

@ -3564,11 +3564,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