Skip to content

Commit 5a03a5f

Browse files
committed
set version in js
1 parent a2a1b93 commit 5a03a5f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

index.html

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@
1515
const micropip = pyodide.pyimport("micropip");
1616
await micropip.install('dist/healpy-0.1.0-py3-none-any.whl');
1717
await micropip.install('matplotlib');
18+
const version = document.getElementById("healpyversion");
19+
version.textContent = pyodide.runPython("import healpy as hp; hp.__version__");
20+
1821
pyodide.runPython(`
1922
import matplotlib
2023
matplotlib.use("module://matplotlib_pyodide.wasm_backend")
2124
import healpy as hp
22-
import js
23-
js.document.healpyversion.textContent = hp.__version__
25+
2426
import matplotlib.pyplot as plt
2527
2628
# m = hp.read_map(

0 commit comments

Comments
 (0)