Function: treemacs--find-python3

treemacs--find-python3 is a byte-compiled function defined in treemacs-customization.el.

Signature

(treemacs--find-python3)

Documentation

Determine the location of python 3.

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-customization.el
(defun treemacs--find-python3 ()
  "Determine the location of python 3."
  (--if-let (executable-find "python3") it
    (when (eq system-type 'windows-nt)
      (condition-case _
          (->> "where python"
               (shell-command-to-string)
               (s-trim)
               (s-lines)
               (--first
                (when (file-exists-p it)
                  (condition-case _
                      (->> (concat (shell-quote-argument it) " --version")
                           (shell-command-to-string)
                           (s-trim)
                           (s-replace "Python " "")
                           (s-left 1)
                           (version<= "3"))
                    (error nil)))))
        (error nil)))))