According to pyodide runPython can return a value https://pyodide.org/en/stable/usage/quickstart.html?highlight=expression#running-python-code
I was looking to the code and I see that you wrap the run call into an exec method which is part of the problem here.
Right now I don't really understand why this wrapper is here and I assume that's because I'm pretty new to the python engine.
In an other hand I don't see how to get anything else then stdout and/or stderr with this hook.
I'll be happy to contribute if you think that could be a great enhancement to get the result of code execution and/or share some variables like globals for exemple.
According to pyodide runPython can return a value https://pyodide.org/en/stable/usage/quickstart.html?highlight=expression#running-python-code
I was looking to the code and I see that you wrap the run call into an exec method which is part of the problem here.
Right now I don't really understand why this wrapper is here and I assume that's because I'm pretty new to the python engine.
In an other hand I don't see how to get anything else then stdout and/or stderr with this hook.
I'll be happy to contribute if you think that could be a great enhancement to get the result of code execution and/or share some variables like globals for exemple.