両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン 次のリビジョン両方とも次のリビジョン |
python:pyodide [2019/09/05 01:55] – [console.html を実行する] ともやん | python:pyodide [2022/10/11 10:11] – ともやん |
---|
<html> | <html> |
<script src="https://www.tomoyan.net/_media/javascript/jquery/terminal/jquery.terminal-2.7.1.min.js"></script> | <script src="https://www.tomoyan.net/_media/javascript/jquery/terminal/jquery.terminal-2.7.1.min.js?cache=recache"></script> |
<link href="https://www.tomoyan.net/_media/javascript/jquery/terminal/jquery.terminal-2.7.1.css" rel="stylesheet"/> | <link href="https://www.tomoyan.net/_media/javascript/jquery/terminal/jquery.terminal-2.7.1.css?cache=recache" rel="stylesheet"/> |
<link href="/_media/python/pyodide/renderedhtml.css" rel="stylesheet"/> | <link href="/_media/python/pyodide/0.14.3/renderedhtml.css?cache=recache" rel="stylesheet"/> |
<style> | <style> |
#terminal { | #terminal { |
<script> | <script> |
self.startTime = new Date(); | self.startTime = new Date(); |
self.languagePluginUrl = '/_media/python/pyodide/'; | self.languagePluginUrl = '/_media/python/pyodide/0.14.3/'; |
</script> | </script> |
<script src="/_media/python/pyodide/pyodide_dev.js"></script> | <script src="/_media/python/pyodide/0.14.3/pyodide_dev.js?cache=-1"></script> |
<script> | <script> |
jQuery(function() { | jQuery(function() { |
{ | { |
greetings: "Interpreter Loading time: " + ms + "ms\r\n" + | greetings: "Interpreter Loading time: " + ms + "ms\r\n" + |
"Welcome to the Pyodide terminal emulator 🐍", | "Welcome to the Pyodide terminal emulator 🐍" + |
| " Version " + pyodide.version(), |
prompt: "[[;red;]>>> ]" | prompt: "[[;red;]>>> ]" |
} | } |
>>> import sys | >>> import sys |
>>> sys.version | >>> sys.version |
3.7.0 (default, Aug 14 2019, 15:05:57) | 3.7.0 (default, Dec 11 2019, 12:37:21) |
[Clang 6.0.1 ] | [Clang 6.0.1 ] |
>>> sys.version_info | >>> sys.version_info |
| |
===== インストール ===== | ===== インストール ===== |
[[https://github.com/iodide-project/pyodide/releases|Releases · iodide-project/pyodide · GitHub]] より [[https://github.com/iodide-project/pyodide/releases/download/0.14.0/pyodide-build-0.14.0.tar.bz2|pyodide-build-0.14.0.tar.bz2]] をダウンロードして Web サーバーに配置する。\\ | [[https://github.com/iodide-project/pyodide/releases|Releases · iodide-project/pyodide · GitHub]] より [[https://github.com/iodide-project/pyodide/releases/download/0.14.3/pyodide-build-0.14.3.tar.bz2|pyodide-build-0.14.3.tar.bz2]] をダウンロードして Web サーバーに配置する。\\ |
| <code> |
| $ curl -LO https://github.com/iodide-project/pyodide/releases/download/0.14.3/pyodide-build-0.14.3.tar.bz2 |
| $ tar jxvf pyodide-build-0.14.3.tar.bz2 -C dokuwiki/data/media/python/pyodide/ |
| </code> |
| |
==== console.html を実行する ==== | ==== console.html を実行する ==== |
===== 参考文献 ===== | ===== 参考文献 ===== |
[[https://hacks.mozilla.org/2019/04/pyodide-bringing-the-scientific-python-stack-to-the-browser/|Pyodide: Bringing the scientific Python stack to the browser - Mozilla Hacks - the Web developer blog]]\\ | [[https://hacks.mozilla.org/2019/04/pyodide-bringing-the-scientific-python-stack-to-the-browser/|Pyodide: Bringing the scientific Python stack to the browser - Mozilla Hacks - the Web developer blog]]\\ |
| [[https://www.publickey1.jp/blog/22/rubywebassemblywasiwebassemblyruby.html|]]\\ |
| |