Run python in browser with pyscript | pyscript tutorial

preview_player
Показать описание


Please subscribe, like and share this video

00:00 - Intro
00:45 - pyscript architecture
02:03 - What is WebAssembly
03:34 - Simple Example with print and display functions
07:22 - external python packages in pyscript
08:26 - matplotlib example
09:50 - Call JavaScript from python
12:58 - Call python from JavaScript
17:26 - DOM Event Handlers in python
21:58 - Link external python scripts with Todo application demo
29:25 - Use cases and benefits of pyscript
30:14 - Outro

#pyscript #python #browser #webassembly #setup #tutorial #learning #beginners #taming_python
Рекомендации по теме
Комментарии
Автор

Great tutorial, much better examples than any articles or even the pyscript website itself. I've created a Wordle game with a team for a school project using the pygame package. The displays are all done through pygame. I know that in order to display text or even matplotlib figures, you simply just use display() from pyscript. But what would I do when the display is done by the call of a pygame function? When I run our main.py, it opens up the game through pygame, but when I open the local website/server it says my title, and nothing happens. I would like for the game to open in the browser itself, but if it just opened up another window to the game that would be okay too. It could be possible that I'm not waiting long enough, but I have a feeling it's more than that. Also, we have a subdirectory called design that holds images and textures. Do I need to include that somewhere in the config or not at all? Sorry to bombard you with questions.

adamice
Автор

Thanks for putting in the effort to make this video. It was super helpful and very much appreciated.

ricksegalCanada
Автор

I tried but it;s giving error in the html page!

venkataphanikailashlanka