feat: code input support

This commit is contained in:
Timothy J. Baek 2024-05-16 20:35:25 -10:00
parent 01a656cc80
commit 302a17b3ed

View File

@ -169,6 +169,8 @@
const res = await pyodide.loadPackage('micropip'); const res = await pyodide.loadPackage('micropip');
console.log(res); console.log(res);
pyodide.setStdin({ stdin: () => prompt() });
const micropip = pyodide.pyimport('micropip'); const micropip = pyodide.pyimport('micropip');
await micropip.set_index_urls('https://pypi.org/pypi/{package_name}/json'); await micropip.set_index_urls('https://pypi.org/pypi/{package_name}/json');