Interpreter.run_path¶
- Interpreter.run_path(path: str, args=[], debug: bool = False, run_as_main: bool = True, package=None) int¶
Runs a script.
It returns the exit code or raises an
pyto_runtime.IntepreterException.- Parameters:
path – The path of the script to execute.
args – The command line arguments.
debug – Boolean indicating whether breakpoints should be enabled.
run_as_main – Boolean indicating whether the script should be run as __main__ or as its file name.
package – An optional parent package name. Used for relative imports so they work, whether running as __main__ or not.