Javascript from Python
29th December 2003
In a way I’m disappointed to see python-spidermonkey released. It’s a Python wrapper around the Mozilla project’s SpiderMonkey Javascript engine which allows Python scripts to execute Javascript code in a rock-solid, battle-tested embedded interpreter.
Why the disappointment? Because just 5 days ago I decided that a Python wrapper for SpiderMonkey would be the ideal project for me to finally attempt to do something productive with C. John J. Lee evidently beat me to it. I can’t complain though, as I was estimating a good six months to figure out how to get it all working.
Pettiness aside, this looks like a really valuable project. In addition to being critical for such things as web based unit testing (John’s DOMForm does exactly that) it may also provide a useful “sandbox” protected interpreted scripting language for Python projects. Python’s own rexec module is meant to provide a safe sandbox for executing potentially hostile code but has been disabled due to potential vulnerabilities. The SeaMonkey Javascript interpreter is tried and tested in this capacity, at least in its incarnation within the Mozilla family of web browsers.
More recent articles
- LLM 0.22, the annotated release notes - 17th February 2025
- Run LLMs on macOS using llm-mlx and Apple's MLX framework - 15th February 2025
- URL-addressable Pyodide Python environments - 13th February 2025