Call the object in the interpreter with given args/kwargs. Nearly all callables, args, kwargs, and return values are supported. All "shareable" objects are supported, as are "stateless" functions (meaning non-closures that do not use any globals). This method will
(self, callable, /, *args, **kwargs)
| 223 | return res |
| 224 | |
| 225 | def call(self, callable, /, *args, **kwargs): |
| 226 | """Call the object in the interpreter with given args/kwargs. |
| 227 | |
| 228 | Nearly all callables, args, kwargs, and return values are |
| 229 | supported. All "shareable" objects are supported, as are |
| 230 | "stateless" functions (meaning non-closures that do not use |
| 231 | any globals). This method will fall back to pickle. |
| 232 | |
| 233 | If the callable raises an exception then the error display |
| 234 | (including full traceback) is sent back between the interpreters |
| 235 | and an ExecutionFailed exception is raised, much like what |
| 236 | happens with Interpreter.exec(). |
| 237 | """ |
| 238 | return self._call(callable, args, kwargs) |
| 239 | |
| 240 | def call_in_thread(self, callable, /, *args, **kwargs): |
| 241 | """Return a new thread that calls the object in the interpreter. |