File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 84
84
globalThis .python .stderr .read = lambda n : sys .stderr .read (n )
85
85
# Python 3.13 dramatically changed how the namespace in `exec`/`eval` works
86
86
# See https://docs.python.org/3.13/whatsnew/3.13.html#defined-mutation-semantics-for-locals
87
- _locals = {} # keep the local variables inside `eval`/`exec` to a dict
88
- globalThis .python .eval = lambda x : eval (x , None , _locals )
89
- globalThis .python .exec = lambda x : exec (x , None , _locals )
90
- globalThis .python .getenv = os .getenv
87
+ globalThis .python .eval = lambda x : eval (x , None , sys ._getframe (1 ).f_locals )
88
+ globalThis .python .exec = lambda x : exec (x , None , sys ._getframe (1 ).f_locals )
91
89
globalThis .python .paths = sys .path
92
90
93
91
globalThis .python .exit = pm .eval ("""'use strict';
You can’t perform that action at this time.
0 commit comments