We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53298ef commit 983975aCopy full SHA for 983975a
hello.py
@@ -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
@@ -1,15 +1,12 @@
<!DOCTYPE html>
<html lang="en">
- <head>
- <script src="mpbuild/micropython.js"></script>
- </head>
<body>
- <py-script>
-def hello(name="World"):
9
- return "Hello, " + name
10
-
11
-print(hello())
12
- </py-script>
+ <py-config>
+ {
+ "runtime": "micropython"
+ }
+ </py-config>
+ <py-script src="hello.py"></py-script>
13
<pre><code id="mp_js_stdout"></code></pre>
14
</body>
15
<script src="pyscript.js" type="module"></script>
0 commit comments