Smith expects JavaScript will remain the preferred language for creating user interfaces in web applications, but said he wouldn't be surprised to see a Python-based front-end framework emerge that tries to take advantage of the CPython on WASM connection. "There will always be places where Javascript will be a better fit than Python in the browser, but I think one of Python's best features is in its ability to act as simple to write glue code." "I see most early usage of CPython on WASM being Javascript calling Python to execute Python code, not vice versa," he said. About half of Python libraries in PyPI may have security issues, boffins say.Snowflake wrestles Python, chases China, and ingests unstructured data.Credit-card-stealing, backdoored packages found in Python's PyPI library hub.Updated Python support in VS Code brings browser editing and ditches open-source language server for Pylance.DOM interaction will have to be done via JavaScript until WebAssembly implements a way to talk directly to the DOM. Smith expects that's possible but will take time to implement. Those wishing to run Python code in the browser will not immediately get access to the browser's Document Object Model, or DOM. This would allow for easier integration with existing code." However, Smith says, "I have plans to investigate allowing synchronous I/O to yield to the browser event loop, which as far as I know, Pyodide does not currently do. One of the limitations with WASM is that it doesn't support blocking/synchronous I/O operations, in order to accommodate JavaScript's non-blocking/asynchronous event loop architecture. "Instead we are upstreaming our patches, which have already made cross compiling in general much easier." The WASM way "The main technical difference between our project and Pyodide is that we don't build a patched version of CPython," he said. "I don't want this project to be quite as specific as Pyodide, but we definitely want to work with them to ensure we don't duplicate work and that scientific computing workloads work well with CPython on WASM," he explained. He sees the CPython on WASM project as having broader goals. Pyodide, said Smith, has a narrow focus – running scientific computing code in the browser – and thus uses a few hacks to make packaging work properly. Eventually, I'd also like to look at WASI, the WebAssembly System Interface, as a means of sandboxing Python code server-side." "My hope is that this will enable a wider ecosystem of Python developers targeting the web, and allow for easier integration with existing Python tools and processes, many of which Pyodide has had to reinvent like micropip to replace the standard pip package installer. This is stock Python running *in the browser*. Thanks to recent commits by I figured out the correct incantations to build CPython's main branch for the web! "The new project which Christian Heimes and I are working on has a goal of making the web a supported platform for CPython, just like Windows or macOS," explained Smith in a note to The Register. CPython on WASM follows in the wake of a project that debuted in April called Pyodide that similarly allows Python code to run within a web browser.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |