Find Executable

0.2.1 · active · verified Thu Apr 16

Find Executable (find-exe) is a Python library and command-line interface designed to locate matching executables on a system given certain criteria. It provides a robust way to programmatically find executables, similar to the `which` or `where` commands, with additional flexibility. The current version is 0.2.1, and it maintains an active release cadence with minor updates and fixes.

Common errors

Warnings

Install

Imports

Quickstart

The quickstart demonstrates finding executables using `find_exe.which()` and `find_exe.with_prefix()`. It also shows how to specify custom search paths using the `paths` argument.

import find_exe

# Find 'python' executable in the system's PATH
python_exe = find_exe.which('python')
print(f"Python executable: {python_exe}")

# Find executables starting with 'py'
# Note: This might return different paths depending on your system configuration.
py_executables = find_exe.with_prefix('py')
print(f"Executables with prefix 'py': {py_executables[:3]}...")

# Find a specific executable in custom paths
custom_paths = ['/usr/local/bin', '/opt/some_app/bin'] # Example paths
git_exe_custom = find_exe.which('git', paths=custom_paths)
print(f"Git executable in custom paths: {git_exe_custom}")

view raw JSON →