Open rth opened 1 year ago
It would be nice if it could detect:
This would be convenient for other things too, maybe adding a small package to Pyodide for this would be nice.
maybe adding a small package to Pyodide for this would be nice.
Making a separate package sounds good to me. People sometimes ask about how they can download files inside the virtual file system, and it would be nice if we can provide some way to do it in Python.
Though it might be reinventing the wheel as there exists a FileSaver.js, but FileSaver.js itself is a small, single file package, so probably we can just reference and rewrite FileSaver.js to work in Pyodide.
micropip.freeze()
returns thepyodide-lock.json
contents, and it would be nice if there was some convenience function that would trigger the download of suchpyodide-lock.json
.Maybe something like,
Though it wouldn't work in a web-worker (and JupyterLite)