You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python code can change stuff in imported packages, and that persists between sessions. The example we have is that the lecturer reassigned sys.stdout but forgot to put it back. So it looked like subsequent runs weren't producing any output.
The only reliably way that we can think of to be sure that the Python environment is "fresh" at the start of each session would be to make a new worker object that loads pyodide from scratch. There's an issue pyodide/pyodide#703 about this.
The downside is that it takes a long time.
Also, we'd have to make sure to destroy each worker after use so that we don't use too much memory.