summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/init-python.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/init-python.el b/lisp/init-python.el
index 1669e12..bf50aaa 100644
--- a/lisp/init-python.el
+++ b/lisp/init-python.el
@@ -18,9 +18,10 @@
(when (executable-find "flake8")
(setq python-flymake-command '("flake8" "-")))
- ;; prefer python3 interpreter
- (when (executable-find "python3")
- (setq python-shell-interpreter "python3")))
+ ;; set prefered interpreter
+ (setq python-shell-interpreter (or (executable-find "ipython")
+ (executable-find "python3")
+ (executable-find "python"))))
(provide 'init-python)