summaryrefslogtreecommitdiffstats
path: root/lisp/init-python.el
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2021-12-06 22:43:50 +0100
committerMartin Polden <mpolden@mpolden.no>2021-12-06 22:43:50 +0100
commitd3fa403e595cd7b2765459eb98a965363dd582bb (patch)
tree333732f7ed8173abedb93663ea82e2b87b1cdb95 /lisp/init-python.el
parentd70ca047cdc562c96e2e1a0ed4e5114c4bbe9686 (diff)
python: Prefer ipython as interpreter if installed
Diffstat (limited to 'lisp/init-python.el')
-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)