Python with Ecmascript

jiri.zahradil at gmail.com jiri.zahradil at gmail.com
Mon Jul 7 03:23:33 EDT 2008


On 7 Čec, 08:21, alex23 <wuwe... at gmail.com> wrote:
> On Jul 7, 12:31 am, "jiri.zahra... at gmail.com"
>
> <jiri.zahra... at gmail.com> wrote:
> > I personally does not like COM solution. I prefer some simple library
> > but may be it is just a hope.
>
> Have you looked at the module 'python-spidermonkey'? It apparently
> "allows for the implementation of Javascript classes, objects and
> functions in Python, as well as the evaluation and calling of
> Javascript scripts and functions".
>
> http://code.google.com/p/python-spidermonkey/

I have looked at it. It seems to be not fully working version, but I
have not check it properly because the project homepage says "windows
version is forthcoming".

At this time I am considering using some command line interpreter
(maybe  jsdb, http://www.jsdb.org/, based on spidermonkey) Idea is to
save script code to file and let it run by interpreter and then parse
the results. Problem is that this approach has very limited access to
variables and objects exposed to javascript (they needs to be
serialized before script run, script cannot call python functions etc)
and also retrieving results is not straigtforward.

Still looking for better solution ...

JZ



More information about the Python-list mailing list