From f0b6a7be53768574ffdd45e7e44b100cdc511ee6 Mon Sep 17 00:00:00 2001 From: Fabio Leimgruber Date: Mon, 9 Oct 2017 18:54:38 +0200 Subject: [PATCH] Custom python interpreter for Windows platform * ob-ipython.el (ob-ipython--launch-driver): `python-shell-interpreter` also considered on Windows platform. Closes #96 --- ob-ipython.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ob-ipython.el b/ob-ipython.el index 8f482ec..d25d6b5 100644 --- a/ob-ipython.el +++ b/ob-ipython.el @@ -165,10 +165,12 @@ 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* ((python-candidate (if (eq system-type 'windows-nt) + "python.exe" + "python"))) + (locate-file (or python-shell-interpreter + python-candidate) + exec-path))) (defun ob-ipython--create-kernel (name &optional kernel) (when (and (not (ignore-errors (process-live-p (get-process (format "kernel-%s" name)))))