()
| 1 | use rustpython_vm as vm; |
| 2 | |
| 3 | fn main() -> vm::PyResult<()> { |
| 4 | vm::Interpreter::without_stdlib(Default::default()).enter(|vm| { |
| 5 | let scope = vm.new_scope_with_builtins(); |
| 6 | let source = r#"print("Hello World!")"#; |
| 7 | let code_obj = vm |
| 8 | .compile(source, vm::compiler::Mode::Exec, "<embedded>".to_owned()) |
| 9 | .map_err(|err| vm.new_syntax_error(&err, Some(source)))?; |
| 10 | |
| 11 | vm.run_code_obj(code_obj, scope)?; |
| 12 | |
| 13 | Ok(()) |
| 14 | }) |
| 15 | } |
nothing calls this directly
no test coverage detected