From fa686f099800aac22dcdc39fb84ee2dcca8ffbf4 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 10 Jan 2021 15:48:57 +0100 Subject: Default python-shell-interpreter to python3 * lisp/progmodes/python.el (python-shell-interpreter): Default to python3 (bug#45655). --- lisp/progmodes/python.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lisp/progmodes/python.el') diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 0965fecfb74..d6c0a4d1dbf 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2027,8 +2027,12 @@ position, else returns nil." :group 'python :safe 'stringp) -(defcustom python-shell-interpreter "python" +(defcustom python-shell-interpreter + (cond ((executable-find "python3") "python3") + ((executable-find "python") "python") + (t "python3")) "Default Python interpreter for shell." + :version "28.1" :type 'string :group 'python) -- cgit v1.2.1