Build#
uz_dataviewer is a Python imgui_bundle application.
imgui_bundle ships prebuilt native binaries (Dear ImGui, ImPlot, hello_imgui) for Windows, and Linux so the same source runs on all desktop platforms, and can also be executed in the browser via Pyodide.
In the following, the build process of uz_dataviewer is described.
Usage of the VS Code Remote Container is assumed.
Native single-file executables (PyInstaller)#
The build collects imgui_bundle and pyarrow (which carry native libraries) into one self-contained binary.
Both native builds wrap pyinstaller build/uz_dataviewer.spec.
Cross-compiling is not supported by PyInstaller.
Build each OS’s binary on that OS.
Linux / Ubuntu#
./build/build_native.sh # from ultrazohm_sw/uz_dataviewer
# -> dist/uz_dataviewer
Windows (PowerShell)#
.\build\build_native.ps1 # from ultrazohm_sw/uz_dataviewer
# -> dist\uz_dataviewer.exe
Web / WASM (Pyodide)#
./build/build_web.sh # writes web/index.html (self-contained)
cd web && python -m http.server 8000 # then open http://localhost:8000/
build_web.sh runs build/gen_web.py, which emits a single self-contained web/index.html following the official imgui_bundle Pyodide template.
At load time the page:
loads Pyodide
v0.29.4from the CDN and wires the WebGL canvas to SDL;micropip-installs the imgui_bundle WASM wheel (hosted by pthom athttps://imgui-bundle.pages.dev/local_wheels/) plusnumpy/pandas/pyarrowfrom the Pyodide package index;writes the embedded
uz_dataviewersources into the Pyodide FS and starts the app (in Pyodideimmapp.run()is auto-patched to be non-blocking).
Note
uz_dataviewer can not be run by opening index.html directly from disk (file://) because the browser blocks Pyodide’s package downloads from a file:// origin. Use any static server, e.g., python -m http.server. uz_dataviewer requires internet access at runtime.
Note
uz_dataviewer is not fully identical in the web-version to the native version. See Limitations of web version for details.