MCPcopy Index your code
hub / github.com/RustPython/RustPython / run_simple_string

Method run_simple_string

crates/vm/src/vm/python_run.rs:14–17  ·  view source on GitHub ↗

PyRun_SimpleString Execute a string of Python code in a new scope with builtins.

(&self, source: &str)

Source from the content-addressed store, hash-verified

12 ///
13 /// Execute a string of Python code in a new scope with builtins.
14 pub fn run_simple_string(&self, source: &str) -> PyResult {
15 let scope = self.new_scope_with_builtins();
16 self.run_string(scope, source, "<string>".to_owned())
17 }
18
19 /// PyRun_String
20 ///

Callers 1

run_rustpythonFunction · 0.80

Calls 3

run_stringMethod · 0.80
to_ownedMethod · 0.45

Tested by

no test coverage detected