:orphan: .. _s_11PytoRuntime11InterpreterC3run_4with17enableBreakpointsSiAA6ScriptO_SaySSGSbtYaKF: ``run(_:with:enableBreakpoints:)`` ================================== Runs a script. .. raw:: html .. rubric:: Declaration .. raw:: html
func run(
       _ script: Script,
       with arguments: [String] = [],
       enableBreakpoints: Bool = false
   ) async throws -> Int
   
.. rubric:: Parameters - **script**: The script to run. - **arguments**: Arguments passed to ``sys.argv``. - **enableBreakpoints**: Indicates whether a tracer should be installed for triggering :swift:symbol:`PytoRuntime.Interpreter.breakpoints`. Significantly slows down execution because of the use of ``sys.settrace``. .. rubric:: Throws An :swift:symbol:`PytoRuntime.Exception` if a Python exception was raised. Otherwise, an :swift:symbol:`PytoRuntime.Interpreter.Error`. .. rubric:: Returns The exit code (0 = success).