Skip to content

Commit f2dc4ca

Browse files
committed
Custom python interpreter for Windows platform
* ob-ipython.el (ob-ipython--launch-driver): `python-shell-interpreter` also considered on Windows platform. Closes #96
1 parent 4a18112 commit f2dc4ca

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

ob-ipython.el

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,12 @@ can be displayed.")
160160
(apply 'start-process name buf (car cmd) (cdr cmd))))
161161

162162
(defun ob-ipython--get-python ()
163-
(locate-file (if (eq system-type 'windows-nt)
164-
"python.exe"
165-
(or python-shell-interpreter "python"))
166-
exec-path))
163+
(let* ((python-candidate (if (eq system-type 'windows-nt)
164+
"python.exe"
165+
"python")))
166+
(locate-file (or python-shell-interpreter
167+
python-candidate)
168+
exec-path)))
167169

168170
(defun ob-ipython--create-kernel (name &optional kernel)
169171
(when (and (not (ignore-errors (process-live-p (get-process (format "kernel-%s" name)))))

0 commit comments

Comments
 (0)