Enum pyenv_python::Python [−][src]
pub enum Python { Pyenv(Pyenv), System(PythonExecutable), }
Expand description
A python
executable, either a pyenv
one or the system python
(i.e. whatever else is in $PATH
).
Variants
Pyenv(Pyenv)
System(PythonExecutable)
Implementations
Lookup the current system python
, i.e., whatever next is in $PATH
that’s not the current executable or a pyenv
shim.
Pass a PyenvRoot
to avoid pyenv
shims.
If there is no pyenv
root than None
will work.
Specifically, this returns the next python
on $PATH
,
excluding the current executable and $PYENV_ROOT/shims/python
.
Otherwise, an infinite loop would be formed between ourselves and $PYENV_ROOT/shims/python
.
See SystemPythonError
for possible errors.
Lookup a python
executable.
If a pyenv
python
cannot be found (see Pyenv::new
),
try finding the system python
(see Python::system
).
If neither can be found, return the errors for both in PythonError
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Python
impl UnwindSafe for Python
Blanket Implementations
Apply a function which takes the parameter by value.
Apply a function which takes the parameter by reference.
Mutably borrows from an owned value. Read more