func getPythonVersion(pythonExecutable string) string {
	cmdPython := exec.Command(pythonExecutable, "--version")
	resultPython, errPython := cmdPython.CombinedOutput()
	if errPython == nil {
		return strings.TrimSpace(strings.TrimLeft(
			string(resultPython), "Python "))
	} else {
		return ""
	}
}
getPythonVersion gets the available version number for a python executable

Use it to check if python2 responds, python3 responds or only python does.
package carPython
import (
	"bytes"
	"fmt"
	"log"
	"os"
	"os/exec"
	"path"
	"path/filepath"
	"strings"
	"text/template"
	"github.com/bullettrain-sh/bullettrain-go-core/src/ansi"
)
const (
	carPaint              = "black:220"
	pythonSymbolPaint     = "32:220"
	pythonSymbolIcon      = "\uE235"            
	virtualenvSymbolIcon  = "\xf0\x9f\x90\x8d"  
	virtualenvSymbolPaint = "32:220"
	carTemplate = `{{.VersionIcon | printf "%s " | cs}}{{.Version | printf "%s " | c}}{{.VenvIcon | printf "%s " | cvs}}{{.Venv | c}}`
)
type Car struct {
	paint string
	Pwd string
}
func (c *Car) GetPaint() string {
	if c.paint = os.Getenv("BULLETTRAIN_CAR_PYTHON_PAINT"); c.paint == "" {
		c.paint = carPaint
	}
	return c.paint
}
func (c *Car) CanShow() bool {
	if e := os.Getenv("BULLETTRAIN_CAR_PYTHON_SHOW"); e == "true" {
		return true
	}
	var d string
	if d = c.Pwd; d == "" {
		return false
	}
	pyPattern := fmt.Sprintf("%s%s*.py", d, string(os.PathSeparator))
	pyFiles, _ := filepath.Glob(pyPattern)
	if pyFiles != nil {
		return true
	}
	versionFiles, _ := filepath.Glob(fmt.Sprintf("%s%s.python-version",
		d, string(os.PathSeparator)))
	if versionFiles != nil {
		return true
	}
	return false
}