10000 Added __terminal__ in non-persistent donkey · pyscript/pyscript@f5c0ffc · GitHub
[go: up one dir, main page]

Skip to content

Commit f5c0ffc

Browse files
committed
Added __terminal__ in non-persistent donkey
1 parent 0d74a60 commit f5c0ffc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/plugins/donkey.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ const { stringify } = JSON;
66
const invoke = (name, args) => `${name}(code, ${args.join(", ")})`;
77

88
const donkey = ({ type = "py", persistent, terminal, config }) => {
9-
const args = persistent ? ["globals()", "__locals__"] : ["{}", "{}"];
9+
const globals = terminal ? '{"__terminal__":__terminal__}' : "{}";
10+
const args = persistent ? ["globals()", "__locals__"] : [globals, "{}"];
1011

1112
const src = URL.createObjectURL(
1213
new Blob([

0 commit comments

Comments
 (0)
0