我已经看过了Compiling Python to WebAssembly,它的各种答案,各种项目(EmPython,EmCPython,cpython-emscripten,Pyodide等),但大多数时候,它需要重新编译或使用Docker等
有没有一种方法可以在浏览器中使用Python(与WebAssembly一起),使其工作方式如下:
您只需将foo.js
、foo.wasm
、index.html
或类似的随时可用的文件放在目录中
您将一个main.py
文件放入目录,当我们在浏览器中打开index.html
时,WebAssembly Python Interepter会自动启动,Python标准输出将直接显示在浏览器中
只需沿main.py
例如:
pythoninbrowser.js
pythoninbrowser.wasm
index.html
main.py --> containing "import bs4"
bs4/
__init__.py
...all the rest of the BeautifulSoup module...
目前没有回答
相关问题 更多 >
编程相关推荐