Seva Alekseyev
Seva Alekseyev

Reputation: 61380

Scriptable JavaScript interpreter with bindings for PHP or Python?

Does anyone know of a JavaScript interpreter that has bindings to PHP or Python?

Upvotes: 5

Views: 658

Answers (4)

Alex Yaroshevich
Alex Yaroshevich

Reputation: 740

At now there is v8js-0.1.3 (beta) pecl package for PHP5.3.3+ You can easily install it like that (debian/ubuntu):

sudo apt-get install libv8-dev
sudo pecl install v8js-beta
sudo bash -c 'echo "extension=v8js.so" > /etc/php5/mods-available/_pecl.v8js.ini'
sudo ln -s ../mods-available/_pecl.v8js.ini /etc/php5/conf.d/30-v8js.ini

I've using _pecl prefix for pecl packages. Of course you can remove or change it as you wish.

Upvotes: 1

ianmclaury
ianmclaury

Reputation: 1156

There's a previous discussion on embedding various languages into PHP.

re: Javascript in particular, Pecl Spidermonkey is mentioned; otherwise, not much to choose from.

Upvotes: 2

Edgar Bonet
Edgar Bonet

Reputation: 3566

Try QtScript, from the Qt library:

from PyQt4 import QtScript

Upvotes: 2

NG.
NG.

Reputation: 22904

You can try pyv8 - Google's v8 engine with Python bindings.

Upvotes: 2

Related Questions