diff options
| author | kobarity | 2025-03-20 19:03:33 +0900 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2025-04-18 14:53:20 +0200 |
| commit | 4dcd66abd570e09093e37c3d0e150fd76a15c95c (patch) | |
| tree | 2cb9e73f2f04770df4417ffeedab8123bc9846e8 /lisp/progmodes/python.el | |
| parent | 01d4eb3dd427feb3439378eab573d685daf47bb7 (diff) | |
| download | emacs-4dcd66abd570e09093e37c3d0e150fd76a15c95c.tar.gz emacs-4dcd66abd570e09093e37c3d0e150fd76a15c95c.zip | |
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)
(cherry picked from commit 4c5c20ddc2cdde570ccf54c4aa60644828ee213d)
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 6 |
1 files changed, 4 insertions, 2 deletions
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." | |||
| 3528 | (defconst python-shell-setup-code | 3528 | (defconst python-shell-setup-code |
| 3529 | "\ | 3529 | "\ |
| 3530 | try: | 3530 | try: |
| 3531 | import tty | 3531 | import termios |
| 3532 | except ImportError: | 3532 | except ImportError: |
| 3533 | pass | 3533 | pass |
| 3534 | else: | 3534 | else: |
| 3535 | tty.setraw(0)" | 3535 | attr = termios.tcgetattr(0) |
| 3536 | attr[3] &= ~termios.ECHO | ||
| 3537 | termios.tcsetattr(0, termios.TCSADRAIN, attr)" | ||
| 3536 | "Code used to setup the inferior Python processes.") | 3538 | "Code used to setup the inferior Python processes.") |
| 3537 | 3539 | ||
| 3538 | (defconst python-shell-eval-setup-code | 3540 | (defconst python-shell-eval-setup-code |