The default file system used in Pyodide is MEMFS, which is a virtual in-memory file system. The data stored in MEMFS will be lost when the page is reloaded. If you wish for files to persist, you can mount other file systems. You can access the native file system from the browser using the File System Access API.
The File System Access API is only supported in Chromium based browsers: Chrome and Edge (as of 2022/08/18).
To access the native file system from the browser and mount it as a directory in the CodeSkool Python environment, click on the File System button and then traverse to the desired folder of the local file system and click Select Folder.

The browser will now ask for read and write permissions separately on that folder. Click View files and Save changes button to provide those permissions to the CodeSkool website.


Now the selected folder from the local file system is mounted in the CodeSkool environment as “/mnt” directory. You can now read and write files in the /mnt directory using Python and it will automatically sync those files and changes to the local/native file system.
