Interpreter.run_repl

Interpreter.run_repl(path=None, args=[], debug: bool = False, run_as_main: bool = True, package=None) → int

Runs the REPL.

It returns the exit code or raises an pyto_runtime.IntepreterException.

Parameters:
  • path – An optional path of a script to execute inside the REPL.

  • 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.