Google Groups Home
Help | Sign in
Python with Ecmascript
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  15 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
jiri.zahradil@gmail.com  
View profile
 More options Jul 5, 9:28 am
Newsgroups: comp.lang.python
From: "jiri.zahra...@gmail.com" <jiri.zahra...@gmail.com>
Date: Sat, 5 Jul 2008 06:28:42 -0700 (PDT)
Local: Sat, Jul 5 2008 9:28 am
Subject: Python with Ecmascript
Hello,

for my Python application (Windows platform) to be standards
compliant, I need to embbed Ecmascript(Javascript) interpreter - I
need to execute plugins written in this language. Which engine is
suitable for Python, I have found bunch of them. Any recomendations
are welcome.

To be more specific, I think that plugins will be pretty simple, they
will be used to manipulate my class-based datamodel, no special
libraries dependencies ... therefore I prefer some rather simple
solution ...

Jiri


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Phil Thompson  
View profile
 More options Jul 5, 12:09 pm
Newsgroups: comp.lang.python
From: Phil Thompson <p...@riverbankcomputing.com>
Date: Sat, 05 Jul 2008 17:09:28 +0100
Local: Sat, Jul 5 2008 12:09 pm
Subject: Re: Python with Ecmascript
On Sat, 5 Jul 2008 06:28:42 -0700 (PDT), "jiri.zahra...@gmail.com"

<jiri.zahra...@gmail.com> wrote:
> Hello,

> for my Python application (Windows platform) to be standards
> compliant, I need to embbed Ecmascript(Javascript) interpreter - I
> need to execute plugins written in this language. Which engine is
> suitable for Python, I have found bunch of them. Any recomendations
> are welcome.

> To be more specific, I think that plugins will be pretty simple, they
> will be used to manipulate my class-based datamodel, no special
> libraries dependencies ... therefore I prefer some rather simple
> solution ...

PyQt includes a Javascript interpreter. You can expose Python objects and
properties as Javascript objects and properties.

Phil


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Méta-MCI (MVP)  
View profile
 More options Jul 5, 4:57 pm
Newsgroups: comp.lang.python
From: "Méta-MCI \(MVP\)" <enleverlesX.X...@XmclaveauX.com>
Date: Sat, 5 Jul 2008 22:57:40 +0200
Local: Sat, Jul 5 2008 4:57 pm
Subject: Re: Python with Ecmascript
Hi!

Ecmascript (Jscript) is Active-Scripting compliant.
With PyWin32, you can :
    - call JScript functions (with parameters)
    - define pieces of code (& run it)

Another way, is to drive Internet-Explorer (via COM). You can set the
IE-Windows as invisible, and connect the motor of execution (of
JScript). Then, you can :
   - call JScript functions, with parameters et return ; variables, but
also array (<=> lists)
   - connect to JScripts's objects  (for read/write)
   - write new functions in JScript
   - etc.

@-salutations

Michel Claveau


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Fetchinson  
View profile
 More options Jul 5, 5:40 pm
Newsgroups: comp.lang.python
From: "Daniel Fetchinson" <fetchin...@googlemail.com>
Date: Sat, 5 Jul 2008 14:40:12 -0700
Local: Sat, Jul 5 2008 5:40 pm
Subject: Re: Python with Ecmascript

> Ecmascript (Jscript) is Active-Scripting compliant.
> With PyWin32, you can :
>     - call JScript functions (with parameters)
>     - define pieces of code (& run it)

> Another way, is to drive Internet-Explorer (via COM). You can set the
> IE-Windows as invisible, and connect the motor of execution (of
> JScript). Then, you can :
>    - call JScript functions, with parameters et return ; variables, but
> also array (<=> lists)
>    - connect to JScripts's objects  (for read/write)
>    - write new functions in JScript
>    - etc.

Is there a way to do similar things on linux?

Cheers,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Roberts  
View profile
 More options Jul 6, 1:02 am
Newsgroups: comp.lang.python
From: Tim Roberts <t...@probo.com>
Date: Sun, 06 Jul 2008 05:02:13 GMT
Local: Sun, Jul 6 2008 1:02 am
Subject: Re: Python with Ecmascript

"jiri.zahra...@gmail.com" <jiri.zahra...@gmail.com> wrote:

>for my Python application (Windows platform) to be standards
>compliant, I need to embbed Ecmascript(Javascript) interpreter - I
>need to execute plugins written in this language.

What standard are you hoping to comply with?  I mean, what kind of a
program is this?
--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Méta-MCI (MVP)  
View profile
 More options Jul 6, 2:10 am
Newsgroups: comp.lang.python
From: "Méta-MCI \(MVP\)" <enleverlesX.X...@XmclaveauX.com>
Date: Sun, 6 Jul 2008 08:10:12 +0200
Local: Sun, Jul 6 2008 2:10 am
Subject: Re: Python with Ecmascript
Hi!

> Is there a way to do similar things on linux?

I think no. Because these tech use COM. And COM don't exist under xxnux.
But:
  - look if XPCOM, or dBus) can help you
  - search with the word "MOZLAB", who work a solution (plugin) for
drive Firefox, from an external software.

Good luck!
--
Michel Claveau


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Fetchinson  
View profile
 More options Jul 6, 3:13 am
Newsgroups: comp.lang.python
From: "Daniel Fetchinson" <fetchin...@googlemail.com>
Date: Sun, 6 Jul 2008 00:13:01 -0700
Local: Sun, Jul 6 2008 3:13 am
Subject: Re: Python with Ecmascript

>> Is there a way to do similar things on linux?

> I think no. Because these tech use COM. And COM don't exist under xxnux.
> But:
>   - look if XPCOM, or dBus) can help you
>   - search with the word "MOZLAB", who work a solution (plugin) for
> drive Firefox, from an external software.

Wow, mozlab is amazing!

Thanks,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jiri.zahradil@gmail.com  
View profile
 More options Jul 6, 10:31 am
Newsgroups: comp.lang.python
From: "jiri.zahra...@gmail.com" <jiri.zahra...@gmail.com>
Date: Sun, 6 Jul 2008 07:31:12 -0700 (PDT)
Local: Sun, Jul 6 2008 10:31 am
Subject: Re: Python with Ecmascript
On 6 Čec, 07:02, Tim Roberts <t...@probo.com> wrote:

> "jiri.zahra...@gmail.com" <jiri.zahra...@gmail.com> wrote:

> >for my Python application (Windows platform) to be standards
> >compliant, I need to embbed Ecmascript(Javascript) interpreter - I
> >need to execute plugins written in this language.

> What standard are you hoping to comply with?  I mean, what kind of a
> program is this?
> --
> Tim Roberts, t...@probo.com
> Providenza & Boekelheide, Inc.

Thats for our speech recognition server - it should executed "tags"
with Javascript code embbeded in some XML grammar format.

I personally does not like COM solution. I prefer some simple library
but may be it is just a hope. I will look to PyQT library and to
Mozilla scripting engine, but I think that this one can get
unnecessarily difficult.

Does anyone work or use something similar?

Jiri


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
alex23  
View profile
 More options Jul 7, 2:21 am
Newsgroups: comp.lang.python
From: alex23 <wuwe...@gmail.com>
Date: Sun, 6 Jul 2008 23:21:51 -0700 (PDT)
Local: Mon, Jul 7 2008 2:21 am
Subject: Re: Python with Ecmascript
On Jul 7, 12:31 am, "jiri.zahra...@gmail.com"

<jiri.zahra...@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/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jiri.zahradil@gmail.com  
View profile
 More options Jul 7, 3:23 am
Newsgroups: comp.lang.python
From: "jiri.zahra...@gmail.com" <jiri.zahra...@gmail.com>
Date: Mon, 7 Jul 2008 00:23:33 -0700 (PDT)
Local: Mon, Jul 7 2008 3:23 am
Subject: Re: Python with Ecmascript
On 7 Čec, 08:21, alex23 <wuwe...@gmail.com> wrote:

> On Jul 7, 12:31 am, "jiri.zahra...@gmail.com"

> <jiri.zahra...@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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
sysprv  
View profile
 More options Jul 7, 8:39 am
Newsgroups: comp.lang.python
From: sysprv <sys...@gmail.com>
Date: Mon, 7 Jul 2008 05:39:10 -0700 (PDT)
Local: Mon, Jul 7 2008 8:39 am
Subject: Re: Python with Ecmascript
On Jul 7, 9:23 am, "jiri.zahra...@gmail.com" <jiri.zahra...@gmail.com>
wrote:

> On 7 Čec, 08:21, alex23 <wuwe...@gmail.com> wrote:

> > On Jul 7, 12:31 am, "jiri.zahra...@gmail.com"

> > <jiri.zahra...@gmail.com> wrote:
> > > I personally does not like COM solution. I prefer some simple library
> > > but may be it is just a hope.

> Still looking for better solution ...

> JZ

How about using Jython and Rhino [http://www.mozilla.org/rhino/] ?
Could be worth your while, if you could live with coding for an older
version of the Python spec.

/sysprv


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alan Isaac  
View profile
 More options Jul 10, 3:07 pm
Newsgroups: comp.lang.python
From: Alan Isaac <ais...@american.edu>
Date: Thu, 10 Jul 2008 19:07:19 GMT
Local: Thurs, Jul 10 2008 3:07 pm
Subject: Re: Python with Ecmascript

Daniel Fetchinson wrote:
> Is there a way to do similar things on linux?

NJSModule?
http://en.wikipedia.org/wiki/NJS

Alan Isaac


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Fetchinson  
View profile
 More options Jul 10, 5:23 pm
Newsgroups: comp.lang.python
From: "Daniel Fetchinson" <fetchin...@googlemail.com>
Date: Thu, 10 Jul 2008 14:23:24 -0700
Local: Thurs, Jul 10 2008 5:23 pm
Subject: Re: Python with Ecmascript