From 905ab89897ef2bc5f0b6fa4ab8a0d6b5732d64b0 Mon Sep 17 00:00:00 2001 From: Sigmund Tzeng Date: Sun, 26 Apr 2020 17:55:41 +0800 Subject: [PATCH 1/2] Update ob-ipython.el respect python-shell-interpreter on windows 10. --- ob-ipython.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ob-ipython.el b/ob-ipython.el index 043fb9a..cc49b78 100644 --- a/ob-ipython.el +++ b/ob-ipython.el @@ -165,10 +165,9 @@ can be displayed.") (apply 'start-process name buf (car cmd) (cdr cmd)))) (defun ob-ipython--get-python () - (locate-file (if (eq system-type 'windows-nt) - "python.exe" - (or python-shell-interpreter "python")) - exec-path)) + (let ((buf ( or python-shell-interpreter "python"))) + ;; (message buf) + (locate-file buf exec-path))) (defun ob-ipython--create-kernel (name &optional kernel) (when (and (not (ignore-errors (process-live-p (get-process (format "kernel-%s" name))))) @@ -272,7 +271,7 @@ a new kernel will be started." (defun ob-ipython--run-async (code name callback args) (let ((proc (ob-ipython--create-process "execute" - (list (ob-ipython--get-python) + (list (ob-ipython--get-pythonb) "--" ob-ipython-client-path "--conn-file" name "--execute")))) ;; TODO: maybe add a way of disabling streaming output? ;; TODO: cleanup and break out - we parse twice, can we parse once? From dc2eeb01bdefc208a1d2c76f9177331bb0ea168c Mon Sep 17 00:00:00 2001 From: Sigmund Tzeng Date: Sun, 26 Apr 2020 18:03:06 +0800 Subject: [PATCH 2/2] fix typo --- ob-ipython.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ob-ipython.el b/ob-ipython.el index cc49b78..33215fe 100644 --- a/ob-ipython.el +++ b/ob-ipython.el @@ -271,7 +271,7 @@ a new kernel will be started." (defun ob-ipython--run-async (code name callback args) (let ((proc (ob-ipython--create-process "execute" - (list (ob-ipython--get-pythonb) + (list (ob-ipython--get-python) "--" ob-ipython-client-path "--conn-file" name "--execute")))) ;; TODO: maybe add a way of disabling streaming output? ;; TODO: cleanup and break out - we parse twice, can we parse once?