Time Slot: Track 1 15:20 - 15:50 Language: Cantonese Speaker: Mr. Scotty Kwok | Sebit Company Limited | Hong Kong
Python 同 Javascript 從來都存在喺兩個平行時空,這兩大程式語言各自有大量開發者社群:做 data science 嘅人學寫 Python,做 web 嘅人學寫 Javascript,幾乎係定律。如果有一日兩者可以互通互用,咁應該幾好玩!
Pyodide/PyScript 嘅出現,就正好就提供咗一個初型,讓兩者可以有某程度上嘅 interoperability。今次我哋會展示 Python 點樣可以同瀏覽器互動,如何操作 DOM,如何利用坊間各種 Javascript libraries。我哋會用幾個例子去試吓玩轉 Python 同 Javascript 之間的無限可能性:
- 如何使用 Python 與 Web frontend/DOM tree 互動
- 如何使用 Python 在瀏覽器上產生 SVG animated graphics
- 使用 Python 和 ThreeJS 在瀏覽器上玩 3D
- 將你的 Python 程序變成 Chrome Extension
- 使用 Electron 將你的 Python 程序打包成跨平台應用程式…等
Python and Javascript have been the two most popular programming language, but they are like existence in their own universe: data scientist/ML developers learn to write Python, whereas web developers learn to write Javascript. But what if the two languages become interoperable? Wouldn’t it be fun?
Pyodide/PyScript is probably by far the closest attempt to exploit this opportunity.
In this talk, by using Pyodide/Pyscript, we will illustrate how Python can interact with the browser, how Python can manipulate the DOM, and how Python can leverage the power of existing Javascript libraries. With some funny examples, we will dive into the many possibilities between Python and Javascript:
- How to interact with Web frontend/DOM tree using Python
- How to create interactive SVG graphics on browsers using Python
- Use Python and ThreeJS to play with 3D objects on browsers.
- Run your Python program as Chrome Extension.
- Package your Python project into cross-platform app using Electron…etc
Mr. Scotty Kwok
Scotty Kwok is a software developer and startup founder. He enjoys writing software and building hardware to solve problem in his job and leisure time. He is currently working in Sebit Company Limited (www.sebit.world) as the CTO and founder, specialised in Al/computer vision. Scotty is a frequent speaker in PyCons (PyCon Hong Kong 2018 & 2021 and PyCon APAC 2021) and also program committee in PyCon Hong Kong 2020,2022,2023.