UnixWhichCommand
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| WhichCommand anyenv.os_commands.base Base class for which/where commands to locate executables. |
⋔ Inheritance diagram¶
graph TD
1303925040["which.UnixWhichCommand"]
2658962468["base.WhichCommand"]
925645236["abc.ABC"]
2751680898["builtins.object"]
2658962468 --> 1303925040
925645236 --> 2658962468
2751680898 --> 925645236
🛈 DocStrings¶
Bases: WhichCommand
Unix/Linux which command implementation.
Source code in src/anyenv/os_commands/which.py
create_command
¶
Generate Unix which command.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
executable
|
str
|
Name of executable to find |
required |
Returns:
| Type | Description |
|---|---|
str
|
The which command string |
parse_command
¶
Parse Unix which result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output
|
str
|
Raw command output |
required |
exit_code
|
int
|
Command exit code |
0
|
Returns:
| Type | Description |
|---|---|
str | None
|
Path to executable or None if not found |