I am not able to import asyncio when running python code, however that should exist in the standard library and there seems to be a python implementation of it in the repo.
The text was updated successfully, but these errors were encountered:
let int = rustpython_vm::Interpreter::with_init(Default::default(), |vm| {
vm.add_native_modules(rustpython_stdlib::get_module_inits());// ...});
int.enter(|vm| {
vm.insert_sys_path(vm.new_pyobj("./pythonfiles")).expect("add path");let m = match vm.import("pyfile",None,0){Ok(m) => m,Err(e) => {
vm.print_exception(e);panic!("Failed at importing python file");}};});
importasyncio# ...
This fails with
File "/file/path/./pythonfiles/pyfile.py", line 1, in <module>
import asyncio
ModuleNotFoundError: No module named 'asyncio'
Gelox commentedNov 28, 2022
I am not able to import
asynciowhen running python code, however that should exist in the standard library and there seems to be a python implementation of it in the repo.The text was updated successfully, but these errors were encountered: