run_tool#
- ctapipe.core.run_tool(tool: Tool, argv=None, cwd=None, raises=True)[source]#
Utility run a certain tool in a python session without exiting.
- Parameters:
- argvList[str]
List of command line arguments for the tool.
- cwdstr or pathlib.Path
Path to a temporary working directory. If none, a new (random) temporary directeory gets created.
- raisesbool
If true, raises Exceptions from running tools, to test them. If false, tools can return a non-zero exit code.
- Returns:
- exit_code: int
The return code of the tool, 0 indicates success, everything else an error