Python will soon be able to compete with JavaScript for web applications

Python will soon be able to compete with JavaScript for web applications

There is a new project that would let the Python programming language run in web browsers using WebAssembly.

The CPython on WASM project, which will build the default and most popular implementation of the Python language written in C, is developed by Berkeley-based software developer Ethan Smith.

According to The Register, the project was created with the help of leading Python developer Christian Heimes, and could make Python a viable alternative to JavaScript, at least for certain web applications.

Python on the web

"The new project that Christian Heimes and we are working on aims to make the website a platform compatible with CPython, in the same way as Windows or macOS," Smith told The Register.

WebAssembly has taken the planet by storm with its promise to bring native web application performance to a level that is not possible with JavaScript.

However, The Register notes that at this point, the purpose of the project to bring Python to the browser through the WebAssembly Emscripten compiler is more use case activation than performance.

The project would be the continuation of another project, called Pyodid, which also lets the Python code run in the browser.

"Hopefully, this will leave a larger ecosystem of Python developers targeting the web and allow for simpler integration with existing Python tools and processes, many of which Pyodide had to re-invent as micropip to replace the pip bulk installer." standard," Forgeron explained.

Smith hopes his project can help facilitate the development of cross-platform web-based applications, but quickly adds that CPython in WASM is still in the early stages of development.