aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorNoam Postavsky2017-08-15 17:49:10 -0400
committerNoam Postavsky2017-08-20 16:43:37 -0400
commit9714545675af046d730352eb03dc00e93b6f7d3c (patch)
treea29c9435e73ae9e155270c38980f794bd18a463f /lisp/progmodes/python.el
parentcdfe1cbca73925800c7be8e7e8073ef86374e654 (diff)
downloademacs-9714545675af046d730352eb03dc00e93b6f7d3c.tar.gz
emacs-9714545675af046d730352eb03dc00e93b6f7d3c.zip
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.
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 6f169123b95..e73b2a8488c 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -2245,7 +2245,11 @@ detection and just returns nil."
2245 ;; `condition-case' and displaying the error message to 2245 ;; `condition-case' and displaying the error message to
2246 ;; the user in the no-prompts warning. 2246 ;; the user in the no-prompts warning.
2247 (ignore-errors 2247 (ignore-errors
2248 (let ((code-file (python-shell--save-temp-file code))) 2248 (let ((code-file
2249 ;; Python 2.x on Windows does not handle
2250 ;; carriage returns in unbuffered mode.
2251 (let ((inhibit-eol-conversion (getenv "PYTHONUNBUFFERED")))
2252 (python-shell--save-temp-file code))))
2249 ;; Use `process-file' as it is remote-host friendly. 2253 ;; Use `process-file' as it is remote-host friendly.
2250 (process-file 2254 (process-file
2251 interpreter 2255 interpreter