ctapipe is not stable yet, so expect large and rapid changes to structure and functionality as we explore various design choices before the 1.0 release.

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