private boolean isPythonValid()

in src/main/groovy/com/jetbrains/python/envs/PythonEnvsPlugin.groovy [591:603]


    private boolean isPythonValid(Project project, Python env) {
        File exec = getExecutable("python", env)
        if (!exec.exists()) return false

        int exitValue
        try {
            exitValue = project.exec { commandLine exec, "-c", "'print(1)'" }.exitValue
        } catch (ignored) {
            return false
        }

        return exitValue == 0
    }