Skip to content

asyncio module in embedded mode issue #4699

Answered by erhanbaris
erhanbaris asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @youknowone
Thank you for your fast response. Actually, I could not find example for my case and I found some information from the repo and codes. But I tried to use call_between_rust_and_python.rs as a reference and got another issue.

Cargo.toml:

rustpython = {git = "http://github.com/rustpython/rustpython.git", features = ["stdlib", "freeze-stdlib"]}

The code:

use rustpython::vm::{VirtualMachine, PyResult, stdlib::get_module_inits, compiler};

fn main() -> PyResult<()> {
    let interp = rustpython::InterpreterConfig::new()
    .init_stdlib()
    .interpreter();


    interp.enter(|vm| {
        let scope = vm.new_scope_with_builtins();

        let code_obj = vm
            .compile(…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@youknowone
Comment options

@erhanbaris
Comment options

@youknowone
Comment options

@erhanbaris
Comment options

Answer selected by erhanbaris
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants