diff options
| author | kobarity | 2025-03-20 19:03:33 +0900 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2025-04-17 14:56:49 +0200 |
| commit | 4c5c20ddc2cdde570ccf54c4aa60644828ee213d (patch) | |
| tree | 407df9f2dfc1647417ae853591227ed478cac3c6 /lisp/progmodes/python.el | |
| parent | 1e4ce136036e1ff43fcc436114e66ce48f33ea01 (diff) | |
| download | emacs-4c5c20ddc2cdde570ccf54c4aa60644828ee213d.tar.gz emacs-4c5c20ddc2cdde570ccf54c4aa60644828ee213d.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)
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 6fbabe99cb0..32035773fde 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -3564,11 +3564,13 @@ eventually provide a shell." | |||
| 3564 | (defconst python-shell-setup-code | 3564 | (defconst python-shell-setup-code |
| 3565 | "\ | 3565 | "\ |
| 3566 | try: | 3566 | try: |
| 3567 | import tty | 3567 | import termios |
| 3568 | except ImportError: | 3568 | except ImportError: |
| 3569 | pass | 3569 | pass |
| 3570 | else: | 3570 | else: |
| 3571 | tty.setraw(0)" | 3571 | attr = termios.tcgetattr(0) |
| 3572 | attr[3] &= ~termios.ECHO | ||
| 3573 | termios.tcsetattr(0, termios.TCSADRAIN, attr)" | ||
| 3572 | "Code used to setup the inferior Python processes.") | 3574 | "Code used to setup the inferior Python processes.") |
| 3573 | 3575 | ||
| 3574 | (defconst python-shell-eval-setup-code | 3576 | (defconst python-shell-eval-setup-code |