pyodide icon indicating copy to clipboard operation
pyodide copied to clipboard

Implement interpreter shutdown

Open hoodmane opened this issue 3 years ago • 0 comments

This is on top of #2795. It adds an option exitMode which can be set to:

  • "no-exit": current behavior.
  • "throw": Shut down interpreter then throw an error
  • "quit-process": in browser, is the same as "throw". In node, sys.exit(returncode) will exit the node process with the given return code.

"quit-process" will be useful when running pytest.

TODO: close out pyodide API after shutdown.

Checklists

  • [ ] Add a CHANGELOG entry
  • [ ] Add / update tests
  • [ ] Add new / update outdated documentation

hoodmane avatar Jun 27 '22 00:06 hoodmane