Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kiwi0fruit/shutilwhich-cwdpatch

Patch for shutil.which and shutilwhich that disables search in CWD on Windows
https://github.com/kiwi0fruit/shutilwhich-cwdpatch

Last synced: about 1 month ago
JSON representation

Patch for shutil.which and shutilwhich that disables search in CWD on Windows

Awesome Lists containing this project

README

        

# shutilwhich-cwdpatch

Patch for `shutil.which` and `shutilwhich` that doesn't prepend CWD in search on Windows.

# Install

```bash
conda install -c defaults -c conda-forge shutilwhich-cwdpatch
```

or

```bash
pip install shutilwhich-cwdpatch
```

# Usage:

Simply import `patch` submodule before importing `shutil.which` or `shutilwhich` to patch them:

```py
import shutilwhich_cwdpatch.patch
from shutil import which
```

Or use `which` without patching:

```py
from shutilwhich_cwdpatch import which
```