rbtools.commands¶
Base support for creating commands.
Functions
|
Determine if the given command exists. |
|
Return an entry point for the given RBTools command. |
- rbtools.commands.command_exists(cmd_name: str) bool[source]¶
Determine if the given command exists.
This function checks for the existence of an RBTools command entry point with the given name and an executable named rbt-“cmd_name” on the path. Aliases are not considered.
- rbtools.commands.find_entry_point_for_command(command_name: str) EntryPoint | None[source]¶
Return an entry point for the given RBTools command.
Changed in version 5.0: This has been updated to return a modern
importlib.metadata.EntryPoint.- Parameters:
command_name (
str) – The name of the command to find.- Returns:
The resulting entry point, if found, or
Noneif not found.- Return type: