Bind the given values into the interpreter's __main__. The values must be shareable.
(self, ns=None, /, **kwargs)
| 187 | return _interpreters.destroy(self._id, restrict=True) |
| 188 | |
| 189 | def prepare_main(self, ns=None, /, **kwargs): |
| 190 | """Bind the given values into the interpreter's __main__. |
| 191 | |
| 192 | The values must be shareable. |
| 193 | """ |
| 194 | ns = dict(ns, **kwargs) if ns is not None else kwargs |
| 195 | _interpreters.set___main___attrs(self._id, ns, restrict=True) |
| 196 | |
| 197 | def exec(self, code, /): |
| 198 | """Run the given source code in the interpreter. |
no outgoing calls