File size: 550 Bytes
bb326a6
 
 
c174bab
bb326a6
 
c174bab
 
 
 
 
 
 
 
 
 
 
 
 
 
bb326a6
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE html>
<html>
	<head>
		<script src="https://cdn.jsdelivr.net/pyodide/v0.19.1/full/pyodide.js"></script>
	</head>
	<body>
		Pyodide test page <br>
		Open your browser console to see Pyodide output
		<script type="text/javascript">
			(async function main(){
				const pyodide = await loadPyodide({
					indexURL : "https://cdn.jsdelivr.net/pyodide/v0.19.1/full/"
				});
				console.log(pyodide.runPython(`
						import sys
						sys.version
				`));
				console.log(pyodide.runPython("print(1 + 2)"));
			})();
		</script>
	</body>
</html>