home ¦ Archives ¦ Atom ¦ RSS

Lee: python-spidermonkey

John J. Lee has put together python-spidermonkey, a way to bridge the Mozilla SpiderMonkey JavaScript (written in C) into a Python interpreter.

I actually saw this a few days ago in the Daily Python URL, but didn't really grasp the significance. Simon Willison pointed out how this might be useful as an embedded interpreter within Python, without having to write a complete language implementation. This could be useful for Python apps that want to expose a scripting mechanism, but can't quite sandbox Python to satisfaction. Sounds wacky, embedding a scripting engine in a scripting engine, but SpiderMonkey is a bit better behaved for restricted execution. Heck, it's burned in through thousands (millions?) of hours of use in Mozilla.

© Brian M. Dennis. Built using Pelican. Theme by Giulio Fidente on github.