GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — RustPython/examples/hello_embed.rs at main · mapbased/RustPython Expand file tree/ Copy pathhello_embed.rsMore file actions 15 lines (12 loc) · 471 Bytes / Copy pathhello_embed.rsFile metadata and controls15 lines (12 loc) · 471 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 use rustpython_vm as vm; fn main() -> vm::PyResult<()> { vm::Interpreter::without_stdlib(Default::default()).enter(|vm| { let scope = vm.new_scope_with_builtins(); let source = r#"print("Hello World!")"#; let code_obj = vm .compile(source, vm::compiler::Mode::Exec, "<embedded>".to_owned()) .map_err(|err| vm.new_syntax_error(&err, Some(source)))?; vm.run_code_obj(code_obj, scope)?; Ok(()) }) } |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |