summaryrefslogtreecommitdiffstats
path: root/lisp/init-python.el
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2020-06-06 15:54:23 +0200
committerMartin Polden <mpolden@mpolden.no>2020-06-06 15:54:23 +0200
commit1ca558933428daa63a166345f77846536293b570 (patch)
treef3ece9e8208b7733e5ff4ecde31e12f3a69436f5 /lisp/init-python.el
parent4d476c10600800f663b1f612cc4d77aee618ec13 (diff)
python: Prefer python3 interpreter
Diffstat (limited to 'lisp/init-python.el')
-rw-r--r--lisp/init-python.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/init-python.el b/lisp/init-python.el
index ec6c741..0ff1f21 100644
--- a/lisp/init-python.el
+++ b/lisp/init-python.el
@@ -11,6 +11,10 @@
:hook (python-mode . python-mode-buffer-local-variables)
:config
;; use flake8 as flymake backend
- (setq python-flymake-command '("flake8" "-")))
+ (setq python-flymake-command '("flake8" "-"))
+
+ ;; prefer python3 interpreter
+ (when (executable-find "python3")
+ (setq python-shell-interpreter "python3")))
(provide 'init-python)