https://pyfound.blogspot.com/2022/05/the-2022-python-language-summit-python.html Python Software Foundation News News from the Python Software Foundation Wednesday, May 11, 2022 The 2022 Python Language Summit: Python in the browser Python can be run on many platforms: Linux, Windows, Apple Macs, microcomputers, and even Android devices. But it's a widely known fact that, if you want code to run in a browser, Python is simply no good - you'll just have to turn to JavaScript. Now, however, that may be about to change. Over the course of the last two years, and following over 60 CPython pull requests (many attached to GitHub issue #84461), Core Developer Christian Heimes and contributor Ethan Smith have achieved a state where the CPython main branch can now be compiled to WebAssembly. This opens up the possibility of being able to run arbitrary Python programs clientside inside your web browser of choice. At the 2022 Python Language Summit, Heimes gave a talk updating the attendees of the progress he's made so far, and where the project hopes to go next. --------------------------------------------------------------------- WebAssembly basics WebAssembly (or "WASM", for short), Heimes explained, is a low-level assembly-like language that can be as fast as native machine code. Unlike your usual machine code, however, WebAssembly is independent from the machine it is running on. Instead, the core principle of WebAssembly is that it can be run anywhere, and can be run in a completely isolated environment. This leads to it being a language that is extremely fast, extremely portable, and provides minimal security risks - perfect for running clientside in a web browser. [Compiling] [What] After much work, CPython now cross-compiles to WebAssembly using emscripten through the --with-emscripten-target=browser flag. The CPython test suite now also passes on emscripten builds, and work is going towards adding a buildbot to CPython's fleet of automatic robot testers, to ensure this work does not regress in the future. Users who want to try out Python in the browser can try it out at https://repl.ethanhs.me/. The work opens up exciting possibilities of being able to run PyGame clientside and adding Jupyter bindings. [Small] [PyGame] --------------------------------------------------------------------- Support status It should be noted that cross-compiling to WebAssembly is still highly experimental, and not yet officially supported by CPython. Several important modules in the Python standard library are not currently included in the bundled package produced when --with-emscripten-target=browser is specified, leading to a number of tests needing to be skipped in order for the test suite to pass. [Support] Nonetheless, the future's bright. Only a few days after Heimes's talk, Peter Wang, CEO at Anaconda, announced the launch of PyScript in a PyCon keynote address. PyScript is a tool that allows Python to be called from within HTML, and to call JavaScript libraries from inside Python code - potentially enabling a website to be written entirely in Python. PyScript is currently built on top of Pyodide, a third-party project bringing Python to the browser, on which work began before Heimes started his work on the CPython main branch. With Heimes's modifications to Python 3.11, this effort will only become easier. Posted by Alex Waygood at 5/11/2022 01:11:00 PM # Labels: pycon Newer Post Older Post Home Mission The mission of the Python Software Foundation is to promote, protect, and advance the Python programming language, and to support and facilitate the growth of a diverse and international community of Python programmers. * Python Software Foundation * Grants Program * Membership * Awards * Meeting Minutes PSF Sponsors PSF Sponsors A big thank you to the above PSF sponsors for supporting our mission! Tweets by @ThePSF Blog Archive * V 2022 (18) + V May (11) o The 2022 Python Language Summit: Lightning talks o The 2022 Python Language Summit: Achieving immorta... o The 2022 Python Language Summit: A per-interpreter... o The 2022 Python Language Summit: Python in the bro... o The 2022 Python Language Summit: Performance Impro... o The 2022 Python Language Summit: Upstreaming optim... o The 2022 Python Language Summit: F-Strings in the ... o The 2022 Python Language Summit: Python without th... o The 2022 Python Language Summit: Dealing with CPyt... o The 2022 Python Language Summit o No Starch Press has released an all-Python Humble ... + > April (2) + > March (3) + > February (1) + > January (1) * > 2021 (42) + > December (3) + > November (4) + > October (3) + > September (2) + > August (1) + > July (2) + > June (4) + > May (12) + > April (5) + > March (1) + > February (4) + > January (1) * > 2020 (51) + > December (8) + > November (3) + > October (3) + > September (4) + > July (4) + > June (2) + > May (10) + > April (11) + > March (4) + > January (2) * > 2019 (45) + > December (3) + > November (3) + > October (3) + > September (4) + > August (3) + > July (3) + > June (5) + > May (11) + > April (1) + > March (2) + > February (5) + > January (2) * > 2018 (31) + > December (5) + > November (1) + > October (4) + > September (1) + > August (2) + > July (3) + > June (3) + > May (5) + > April (2) + > March (2) + > February (1) + > January (2) * > 2017 (32) + > December (3) + > November (2) + > October (4) + > September (6) + > August (2) + > July (2) + > May (2) + > April (3) + > March (2) + > February (2) + > January (4) * > 2016 (27) + > December (2) + > October (2) + > August (4) + > July (1) + > June (3) + > May (6) + > April (4) + > March (2) + > January (3) * > 2015 (67) + > December (2) + > November (4) + > October (4) + > September (1) + > August (2) + > July (4) + > June (6) + > May (4) + > April (13) + > March (14) + > February (9) + > January (4) * > 2014 (14) + > October (1) + > September (1) + > August (2) + > July (1) + > May (1) + > April (1) + > March (2) + > February (3) + > January (2) * > 2013 (18) + > November (1) + > September (2) + > August (1) + > July (1) + > June (1) + > April (1) + > March (5) + > February (3) + > January (3) * > 2012 (21) + > December (3) + > November (2) + > October (2) + > September (1) + > August (1) + > July (1) + > June (2) + > May (4) + > April (1) + > March (1) + > January (3) * > 2011 (55) + > December (2) + > November (1) + > October (7) + > September (5) + > August (2) + > July (1) + > June (3) + > May (8) + > April (8) + > March (13) + > February (2) + > January (3) * > 2010 (35) + > December (4) + > November (1) + > October (3) + > September (2) + > August (1) + > July (8) + > June (6) + > May (2) + > April (4) + > March (2) + > January (2) * > 2009 (21) + > December (1) + > October (1) + > September (6) + > August (4) + > July (4) + > June (1) + > May (2) + > April (1) + > February (1) * > 2008 (23) + > December (1) + > November (1) + > October (1) + > August (3) + > July (1) + > May (3) + > April (1) + > March (5) + > February (4) + > January (3) * > 2007 (26) + > December (3) + > November (2) + > October (6) + > September (1) + > August (1) + > July (1) + > June (2) + > May (1) + > April (1) + > March (2) + > February (3) + > January (3) * > 2006 (39) + > December (3) + > November (4) + > October (5) + > September (4) + > August (4) + > July (3) + > May (7) + > April (6) + > March (3) Simple theme. Powered by Blogger.