Skip to content
This repository was archived by the owner on Sep 21, 2023. It is now read-only.

Commit 983975a

Browse files
committed
It works (sort of).
1 parent 53298ef commit 983975a

File tree

3 files changed

+443
-18
lines changed

3 files changed

+443
-18
lines changed

hello.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
"""
2+
A simple "Hello, World" example of Python code.
3+
"""
4+
5+
def hello(name="World!"):
6+
return "Hello, " + name
7+
8+
print(hello())

index.html

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
4-
<script src="mpbuild/micropython.js"></script>
5-
</head>
63
<body>
7-
<py-script>
8-
def hello(name="World"):
9-
return "Hello, " + name
10-
11-
print(hello())
12-
</py-script>
4+
<py-config>
5+
{
6+
"runtime": "micropython"
7+
}
8+
</py-config>
9+
<py-script src="hello.py"></py-script>
1310
<pre><code id="mp_js_stdout"></code></pre>
1411
</body>
1512
<script src="pyscript.js" type="module"></script>

0 commit comments

Comments
 (0)