Skip to content

Commit 6532a4e

Browse files
fleimgruberleimgruberf
authored andcommitted
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 0cd6f75 commit 6532a4e

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
@@ -165,10 +165,12 @@ can be displayed.")
165165
(apply 'start-process name buf (car cmd) (cdr cmd))))
166166

167167
(defun ob-ipython--get-python ()
168-
(locate-file (if (eq system-type 'windows-nt)
169-
"python.exe"
170-
(or python-shell-interpreter "python"))
171-
exec-path))
168+
(let* ((python-candidate (if (eq system-type 'windows-nt)
169+
"python.exe"
170+
"python")))
171+
(locate-file (or python-shell-interpreter
172+
python-candidate)
173+
exec-path)))
172174

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

0 commit comments

Comments
 (0)