Skip to main content

is_virtualenv_base

Function is_virtualenv_base 

Source
pub fn is_virtualenv_base(path: impl AsRef<Path>) -> bool
Expand description

Returns true if a path is the base path of a virtual environment, indicated by the presence of a pyvenv.cfg file.

The procedure described in PEP 405 includes scanning pyvenv.cfg for a home key, but in practice we’ve found this to be unnecessary.