The idea of running Python in a web browser seems amazing.
Pyodide軟件為什麼能實現瀏覽器上報行Python指令, What is Pyodide?
Pyodide is an open-source library that was started at Mozilla as part of the Iodide project.
Pyodide allows a user to run Python in a web browser through having the Python interpreter compiled to Web Assembly (WASM).
讓我想起了, 微信Wechat還可跑微信小程序,現在我去餐館掃碼點餐多方便。
It comes with 75 packages already in the base library, most of which are part of the scientific stack such as NumPy and Pandas.
Other packages can be installed if they are pure python wheels from PyPI. Check out the Pyodide library here and the docs here.
初學Python朋友,即上瀏覽器即學習 What use cases can we see Pyodide filling?
Since Python is a great language for beginners, we always keep beginner programmers and students top of mind when we think about who our users are and what they need.
We have found that beginner users struggle to install and configure Python and these steps are a barrier during their getting started experience.
Additionally, we have seen that some schools who restrict network access on school computers accidentally block students from downloading Python onto a school computer.
This was a very compelling use case and so I began exploring it as an option and I learned so much about Pyodide along the way.
個人觀點,持續發展性 Advantages of Pyodide
I think Pyodide brings a whole new set of opportunities to Python that are poised to become very impactful to all different types of developers.
The size of Pyodide is a bit big but it is manageable, and the library has great performance speeds that remain constant across Chrome and Edge during our light testing.
Since the project is open-source it is simple to add new supported libraries to Pyodide’s current list of 75 packages,
and the library in general continues to be actively maintained by a few core contributors.
The activity on the Pyodide repo means that issues are being answered quickly and new features.
Pyodide is continuously improving, and the limitations right now should not be viewed as static.
Python初級課程(選節)
Beginning Python Tutorial
Defining variables
There are several common types in Python. They are `int`, `float`, `str`, `boolean`, `None`, `list`, `dict`.
Output:
Concatenate string and numberic variables together