mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
52 lines
1.7 KiB
HTML
52 lines
1.7 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
<title>python</title>
|
|
<link rel="stylesheet" href="style.css" />
|
|
<script type="importmap">
|
|
{
|
|
"imports": {
|
|
"basic-devtools": "../node_modules/basic-devtools/esm/index.js",
|
|
"coincident/structured": "../node_modules/coincident/structured.js",
|
|
"@ungap/with-resolvers": "../node_modules/@ungap/with-resolvers/index.js"
|
|
}
|
|
}
|
|
</script>
|
|
<script type="module" src="../esm/index.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="pyodide">
|
|
def print_version():
|
|
import sys
|
|
print(sys.version)
|
|
print("bad.", file=sys.stderr)
|
|
</script>
|
|
<button py-click="print_version()">python version</button>
|
|
|
|
<script type="micropython">
|
|
def print_version():
|
|
import sys
|
|
print(sys.version)
|
|
print("bad.", file=sys.stderr)
|
|
</script>
|
|
<button micropython-click="print_version()">micropython version</button>
|
|
|
|
<script type="wasmoon">
|
|
function print_version()
|
|
print(_VERSION)
|
|
printErr(123)
|
|
end
|
|
</script>
|
|
<button lua-click="print_version()">lua version</button>
|
|
|
|
<script type="ruby-wasm-wasi">
|
|
def print_version()
|
|
print "ruby #{ RUBY_VERSION }p#{ RUBY_PATCHLEVEL }"
|
|
end
|
|
</script>
|
|
<button ruby-wasm-wasi-click="print_version()">ruby version</button>
|
|
</body>
|
|
</html>
|