A script to search for a file in a list of directories.
Project description
pathsearch
A script to search for a file in a list of directories.
Install
You can install this script from PyPi with your favorite package manager. For example:
pip install pathsearch poetry add pathsearch
Usage
$ pathsearch -h usage: pathsearch [-h] [-V] [-pe] [-v | -q] (-p PATH | -e VAR) file Search for a file in a list of directories positional arguments: file File to search for on the specified path options: -h, --help show this help message and exit -V, --version show program's version number and exit -pe, --pathext Look for file with extensions in environment variable PATHEXT (normally only set on Windows) (default: False) -v, --verbose Be verbose -q, --quiet Be quiet (only print found files) -p PATH, --path PATH Literal path to look in (e.g. /usr/bin:/bin:/usr/sbin:/sbin) -e VAR, --env VAR Environment variable to take path to search from (e.g. PATH or LD_LIBRARY_PATH)
You can specify a literal path to look in with the -p or --path option. Or, you can specify an environment variable to take the path from with the -e or --env option. The -pe or --pathext option is generally only useful on Windows, and will look for files with extensions in the PATHEXT environment variable, for example, pathsearch -pe -e PATH cmd will look for cmd.exe, cmd.bat, cmd.com etc. in the path. See https://superuser.com/questions/1027078/what-is-the-default-value-of-the-pathext-environment-variable-for-windows for more information.
License
This project is licensed under the MIT license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pathsearch-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 984e18887e5f336058c3b23545cca3fc0b74aabb88bda368bc920690d9a2bcb7 |
|
MD5 | 198c7a6f3634502e4655d1971389add5 |
|
BLAKE2b-256 | b4a41bbf66db9480898f90c63851185f39a85a0dabbdc152df794380c4a7e64e |