From d3fa403e595cd7b2765459eb98a965363dd582bb Mon Sep 17 00:00:00 2001 From: Martin Polden Date: Mon, 6 Dec 2021 22:43:50 +0100 Subject: python: Prefer ipython as interpreter if installed --- lisp/init-python.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lisp/init-python.el') 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) -- cgit v1.2.3