Files
pyscript/pyscript.core/test/test.html
Andrea Giammarchi af72e232c3 Worker sync utility (#1511)
* patched an issue with wasmoon randomly asking to resolve proxy references
  * simplified pyodide and micropython dance by grouping their common utilities together
  * created an integration test around a worker to main thread input between MicroPython and Lua
  * commented some weird bugs / funny behaviors around both MicroPython and Pyodide
  * other minor clean ups
2023-06-08 11:10:47 +02:00

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="py">
def print_version():
import sys
print(sys.version)
print("bad.", file=sys.stderr)
</script>
<button py-click="print_version()">python version</button>
<script type="mpy">
def print_version():
import sys
print(sys.version)
print("bad.", file=sys.stderr)
</script>
<button mpy-click="print_version()">micropython version</button>
<script type="lua">
function print_version()
print(_VERSION)
printErr(123)
end
</script>
<button lua-click="print_version()">lua version</button>
<script type="rb">
def print_version()
print "ruby #{ RUBY_VERSION }p#{ RUBY_PATCHLEVEL }"
end
</script>
<button rb-click="print_version()">ruby version</button>
</body>
</html>