mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-20 18:55:29 -05:00
change OutputManager to actually have separate contexts for out and err to scripts can manage both in one place
This commit is contained in:
@@ -115,9 +115,11 @@ export class BaseEvalElement extends HTMLElement {
|
||||
await this._register_esm(pyodide);
|
||||
|
||||
if (source.includes("asyncio")){
|
||||
await pyodide.runPythonAsync(`output_manager.change("`+this.outputElement.id+`")`);
|
||||
output = await pyodide.runPythonAsync(source);
|
||||
await pyodide.runPythonAsync(`output_manager.revert()`)
|
||||
}else{
|
||||
output = pyodide.runPython(`output_manager.change("`+this.outputElement.id+`")`);
|
||||
output = pyodide.runPython(source);
|
||||
pyodide.runPython(`output_manager.revert()`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user