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

Function run

examples/freeze/main.rs:7–20  ·  view source on GitHub ↗
(vm: &vm::VirtualMachine)

Source from the content-addressed store, hash-verified

5}
6
7fn run(vm: &vm::VirtualMachine) -> vm::PyResult<()> {
8 let scope = vm.new_scope_with_builtins();
9
10 // the file parameter is relative to the current file.
11 let module = vm::py_compile!(file = "freeze.py");
12
13 let res = vm.run_code_obj(vm.ctx.new_code(module), scope);
14
15 if let Err(exc) = res {
16 vm.print_exception(exc);
17 }
18
19 Ok(())
20}

Callers

nothing calls this directly

Calls 4

run_code_objMethod · 0.80
print_exceptionMethod · 0.80
new_codeMethod · 0.45

Tested by

no test coverage detected