[][src]Function pyembed::run_repl

pub fn run_repl(py: Python<'_>) -> PyResult<PyObject>

Start and run a Python REPL.

This emulates what CPython's main.c does.

The interpreter is automatically initialized if needed.

A more robust mechanism to run a Python REPL is by calling MainPythonInterpreter.run_as_main() with OxidizedPythonInterpreterConfig.run = PythonRunMode::Repl, as this mode will run the actual code that python does, not a reimplementation of it. See run_as_main()'s documentation for more.