diff options
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 3bfc5cf4b6f..426b465f745 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -2200,6 +2200,8 @@ detection and just returns nil." | |||
| 2200 | "ps_json = '\\n[\"%s\", \"%s\", \"%s\"]\\n' % tuple(ps)\n" | 2200 | "ps_json = '\\n[\"%s\", \"%s\", \"%s\"]\\n' % tuple(ps)\n" |
| 2201 | "print (ps_json)\n" | 2201 | "print (ps_json)\n" |
| 2202 | "sys.exit(0)\n")) | 2202 | "sys.exit(0)\n")) |
| 2203 | (interpreter python-shell-interpreter) | ||
| 2204 | (interpreter-arg python-shell-interpreter-interactive-arg) | ||
| 2203 | (output | 2205 | (output |
| 2204 | (with-temp-buffer | 2206 | (with-temp-buffer |
| 2205 | ;; TODO: improve error handling by using | 2207 | ;; TODO: improve error handling by using |
| @@ -2209,11 +2211,11 @@ detection and just returns nil." | |||
| 2209 | (let ((code-file (python-shell--save-temp-file code))) | 2211 | (let ((code-file (python-shell--save-temp-file code))) |
| 2210 | ;; Use `process-file' as it is remote-host friendly. | 2212 | ;; Use `process-file' as it is remote-host friendly. |
| 2211 | (process-file | 2213 | (process-file |
| 2212 | python-shell-interpreter | 2214 | interpreter |
| 2213 | code-file | 2215 | code-file |
| 2214 | '(t nil) | 2216 | '(t nil) |
| 2215 | nil | 2217 | nil |
| 2216 | python-shell-interpreter-interactive-arg) | 2218 | interpreter-arg) |
| 2217 | ;; Try to cleanup | 2219 | ;; Try to cleanup |
| 2218 | (delete-file code-file))) | 2220 | (delete-file code-file))) |
| 2219 | (buffer-string))) | 2221 | (buffer-string))) |