mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-08 23:40:24 -08:00
Work around w32-python-2.x bug to fix prompt detection (Bug#21376)
* lisp/progmodes/python.el (python-shell-prompt-detect): Don't put carriage returns into the temporary file when running in unbuffered mode, the w32 build of python 2.7 chokes on them.
This commit is contained in:
parent
cdfe1cbca7
commit
9714545675
1 changed files with 5 additions and 1 deletions
|
|
@ -2245,7 +2245,11 @@ detection and just returns nil."
|
|||
;; `condition-case' and displaying the error message to
|
||||
;; the user in the no-prompts warning.
|
||||
(ignore-errors
|
||||
(let ((code-file (python-shell--save-temp-file code)))
|
||||
(let ((code-file
|
||||
;; Python 2.x on Windows does not handle
|
||||
;; carriage returns in unbuffered mode.
|
||||
(let ((inhibit-eol-conversion (getenv "PYTHONUNBUFFERED")))
|
||||
(python-shell--save-temp-file code))))
|
||||
;; Use `process-file' as it is remote-host friendly.
|
||||
(process-file
|
||||
interpreter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue