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§
- Exact
Version - Specifies the
major.minor
version of a Python executable.
Enums§
- Error
- Error enum for the entire crate.
- Requested
Version - 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
onPATH
.
Type Aliases§
- Component
Size - The integral part of a version specifier (e.g. the
3
or10
of3.10
). - Result
std::result::Result
type withError
as the error type.