import adulib.utils as this_module
utils
General utility functions.
as_dict
**kwargs) as_dict(
Convert keyword arguments to a dictionary.
check_mutual_exclusivity
*args) check_mutual_exclusivity(
Check if only one of the arguments is falsy (or truthy, if check_falsy is False).
run_script
run_script(
script_path: Path,
cwd: Path,dict,
env: bool,
interactive: bool
raise_on_error: )
Execute a Python or Bash script with specified parameters and environment variables.
Arguments: - script_path
(Path): Path to the script file to execute (.py or .sh) - cwd
(Path): Working directory for script execution. Defaults to None. - env
(dict): Additional environment variables to pass to the script. Defaults to None. - interactive
(bool): Whether to run the script in interactive mode. Defaults to False. - raise_on_error
(bool): Whether to raise an exception on non-zero exit code. Defaults to True.
Returns: tuple: A tuple containing: - int: Return code from the script execution - str or None: Standard output (None if interactive mode) - bytes: Contents of the temporary output file