File tree 3 files changed +44
-0
lines changed
3 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 7
7
</ head >
8
8
< body >
9
9
< ul >
10
+ < li >
11
+ < small > < strong > raw interpreter</ strong > </ small >
12
+ < ul >
13
+ < li > < a href ="/test/raw/micropython/ "> micropython</ a > </ li >
14
+ < li > < a href ="/test/raw/pyodide/ "> pyodide</ a > </ li >
15
+ </ ul >
16
+ < hr >
17
+ </ li >
10
18
< li >
11
19
< a href ="/test/integration.html ">
12
20
< strong > integration tests</ strong > < small > (list)</ small >
Original file line number Diff line number Diff line change
1
+ <!doctype html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="UTF-8 ">
5
+ < meta name ="viewport " content ="width=device-width,initial-scale=1.0 ">
6
+ < script type ="module ">
7
+ const base = 'https://cdn.jsdelivr.net/npm/@micropython/micropython-webassembly-pyscript@latest' ;
8
+ const { loadMicroPython } = await import ( `${ base } /micropython.mjs` ) ;
9
+ const interpreter = await loadMicroPython ( { url : `${ base } /micropython.wasm` } ) ;
10
+ const { textContent } = document . querySelector ( 'script[type=micropython]' ) ;
11
+ interpreter . runPythonAsync ( textContent ) ;
12
+ </ script >
13
+ < script type ="micropython " async >
14
+ import js
15
+ js . document . body . textContent = "MicroPython"
16
+ </ script >
17
+ </ head >
18
+ </ html >
Original file line number Diff line number Diff line change
1
+ <!doctype html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="UTF-8 ">
5
+ < meta name ="viewport " content ="width=device-width,initial-scale=1.0 ">
6
+ < script type ="module ">
7
+ const base = 'https://cdn.jsdelivr.net/npm/pyodide@latest' ;
8
+ const { loadPyodide } = await import ( `${ base } /pyodide.mjs` ) ;
9
+ const interpreter = await loadPyodide ( ) ;
10
+ const { textContent } = document . querySelector ( 'script[type=pyodide]' ) ;
11
+ interpreter . runPythonAsync ( textContent ) ;
12
+ </ script >
13
+ < script type ="pyodide " async >
14
+ import js
15
+ js . document . body . textContent = "Pyodide"
16
+ </ script >
17
+ </ head >
18
+ </ html >
You can’t perform that action at this time.
0 commit comments