kitao / pyxel

A retro game engine for Python
MIT License
15.15k stars 840 forks source link

Possible to use url Param or a value from local storage in the game code #549

Open saitanay opened 3 months ago

saitanay commented 3 months ago

I have built a small game. Able to render it on the web using the web launcher

Unable to figure out if there is a way I can access an url Param or a cookie or a local storage value in game python code via pyodide.

Any such example code?

Thanks in advance.

kitao commented 2 weeks ago

There's no such API in Pyxel for now. But the Web version of Pyxel runs on PyO3, so you may use some way with PyO3. Please check PyO3's document.