--- id: whichcraft version: "0.6.1" license: BSD license_treatment: permissive maintenance: abandoned --- # whichcraft — This package provides cross-platform cross-python shutil.which functionality. License: permissive · Maintenance: abandoned · Downloads: 363.1K/mo ## What it is and what it does whichcraft is a lightweight shim around Python's shutil.which function designed to work consistently across Windows, macOS, and Linux, and across Python 2.7 and Python 3.x versions. It locates executables in the system PATH and returns their full path as a string, or None if the command is not found. The package was originally extracted from the Cookiecutter project to reduce code duplication. It handles cross-platform differences in how the which functionality behaves—for example, some built-in commands like 'date' exist natively on Unix systems but are built-in functions on Windows, which affects the return value. With no runtime dependencies and a simple API, it is useful for scripts and tools that need to find system commands portably. Use it for: - Locate system executables in build scripts or deployment tools that run on multiple operating systems. - Check whether a required command-line tool is installed before attempting to invoke it. - Write Python 2.7 compatible code that needs shutil.which functionality without conditional imports. - Verify the full path to a command in cross-platform CLI applications or wrappers. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a cross-platform, cross-Python implementation of shutil.which to locate executable commands in the system PATH. Yes, if you need cross-platform which functionality for Python 2.7 or older Python 3 versions. However, modern Python 3.3+ includes shutil.which natively, so this package is most useful for legacy codebases or environments where Python 2.7 support is still required. The package is abandoned since 2019-09-06, so consider whether you can rely on unmaintained code for your use case. ## Install pip install whichcraft uv add whichcraft poetry add whichcraft ## Installing whichcraft Before you install: Installation is straightforward with no runtime dependencies. The package is abandoned, with the latest release on 2019-09-06 and no updates since then. License in practice: BSD license is permissive, allowing commercial and private use with minimal restrictions. Quickstart: pip install whichcraft from whichcraft import which result = which('date') print(result) # '/bin/date' or None if not found Verify before relying: - Whether the package functions correctly on Python versions beyond 3.7, given its abandoned status. - Current compatibility with Windows built-in functions like 'date' that behave differently than on Unix systems. ## Package facts - License: BSD (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 363.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags find executable in path, cross-platform which command, locate system command python, shutil.which alternative, command line tool finder, windows mac linux which, python 2 and 3 which, cross-platform, legacy-python [View on SkillFed](https://skillfed.io/packages/whichcraft) · [View on PyPI](https://pypi.org/project/whichcraft/)