mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-19 19:10:17 +00:00
...
This commit is contained in:
parent
e2d4f57859
commit
b01234d27e
@ -259,14 +259,15 @@ DEALINGS IN THE SOFTWARE.
|
||||
var Module = {
|
||||
onRuntimeInitialized: function () {
|
||||
Module.ccall('py_initialize', null, [], []);
|
||||
console.log("py_initialize() called");
|
||||
},
|
||||
print: function (text) {
|
||||
console.log(text);
|
||||
code_output.innerText += text + '\n';
|
||||
},
|
||||
onabort: function (what) {
|
||||
code_output.innerText += 'Aborted: ' + what + '\n';
|
||||
Module.ccall('py_finalize', null, [], []);
|
||||
console.log("py_finalize() called");
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -294,6 +295,7 @@ DEALINGS IN THE SOFTWARE.
|
||||
'py_exec', 'boolean', ['string', 'string', 'number', 'number'],
|
||||
[source, 'main.py', 0, 0]
|
||||
);
|
||||
console.log("py_exec() called");
|
||||
if (!ok) {
|
||||
Module.ccall('py_printexc', null, [], []);
|
||||
Module.ccall('py_clearexc', null, ['number'], [0]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user