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
- I can now run a GPT-4 class model on my laptop - 9th December 2024
- Prompts.js - 7th December 2024
- First impressions of the new Amazon Nova LLMs (via a new llm-bedrock plugin) - 4th December 2024