Crate python_launcher

Source
Expand description

Search for Python interpreters in the environment

This crate provides the code to both find Python interpreters installed and utilities to implement a CLI which mimic the Python Launcher for Windows.

§Layout

At the top-level, the code directly related to searching is provided. The RequestedVersion enum represents the constraints the user has placed upon what version of Python they are searching for (ranging from any to a major.minor version). The ExactVersion struct represents an exact major.minor version of Python which was found.

The cli module contains all code related to providing a CLI like the one the Python Launcher for Windows provides.

Modules§

cli
Parsing of CLI flags

Structs§

ExactVersion
Specifies the major.minor version of a Python executable.

Enums§

Error
Error enum for the entire crate.
RequestedVersion
The version of Python being searched for.

Functions§

all_executables
Finds all possible Python executables on PATH.
find_executable
Attempts to find an executable that satisfies a specified RequestedVersion on PATH.

Type Aliases§

ComponentSize
The integral part of a version specifier (e.g. the 3 or 10 of 3.10).
Result
std::result::Result type with Error as the error type.