host_tools
host_tools
¶
Find host executables from the caller's current absolute PATH entries.
This module uses only the standard library. Setup may copy its source into standalone programs without introducing an installed-package dependency.
__all__ = ['host_path', 'find_host_tool', 'require_host_tool', 'host_tools_source']
module-attribute
¶
host_path(path=None)
¶
Keep absolute search directories, without resolving symlinks or adding defaults.
None reads the current environment. An absent or explicitly empty PATH
permits no name lookup; empty and relative entries never search the cwd.
Source code in src/terok_util/host_tools.py
find_host_tool(name, *, path=None)
¶
Find an executable by name or an explicitly supplied absolute path.
Relative paths containing a slash are rejected. Returned paths retain the spelling selected by PATH, including symlinks, and are never cached.
Source code in src/terok_util/host_tools.py
require_host_tool(name, *, path=None)
¶
Find an executable or raise FileNotFoundError with the searched PATH.