mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-20 02:37:41 -05:00
32 lines
1.0 KiB
HTML
32 lines
1.0 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>PyScript Next</title>
|
|
<script>
|
|
addEventListener("py:ready", console.log);
|
|
</script>
|
|
<link rel="stylesheet" href="../dist/core.css">
|
|
<script type="module" src="../dist/core.js"></script>
|
|
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/xterm@5.2.1/css/xterm.min.css">
|
|
|
|
</head>
|
|
<body>
|
|
<script type="py">
|
|
import sys
|
|
from pyscript import display
|
|
display("Hello", "PyScript Next", append=False)
|
|
print("this should go to the terminal")
|
|
print("another line")
|
|
|
|
# XXX we have a problem with the error plugin: this line should
|
|
# just go to the terminal, NOT to the red box in the DOM
|
|
print("this goes to stderr", file=sys.stderr)
|
|
</script>
|
|
|
|
<py-terminal></py-terminal>
|
|
</body>
|
|
</html>
|