[OLPC library] Curly Logo / OLPC

Tomeu Vizoso tomeu at tomeuvizoso.net
Wed Nov 28 16:28:59 EST 2007


On Wed, 2007-11-28 at 16:16 -0500, Erik Blankinship wrote:
> 
> 
> On 11/28/07, Tomeu Vizoso <tomeu at tomeuvizoso.net> wrote:
>         On Wed, 2007-11-28 at 15:49 -0500, Erik Blankinship wrote:
>         >
>         >         The parts for interacting with the journal and
>         sharing could
>         >         be written
>         >         in python. With pyxpcom, a xpcom component could be
>         written 
>         >         that gives
>         >         access to JS to all the services in sugar.
>         >
>         > Is pyxpcom installed?  Is there an example of this running
>         right now?
>         
>         Browse uses pyxpcom. If I had to develop an activity using js,
>         html, 
>         xul, etc., I would inspire in Browse's code.
>         
>         Hulahop is a thin wrapper around pypxcom, for integrating it
>         in gtk.
>         AFAIR, Marco had this use case in mind when he coded it.
>         
>         http://dev.laptop.org/git?p=projects/hulahop;a=summary
>         http://dev.laptop.org/git?p=web-activity;a=summary
> 
> 
> Thanks, Tomeu!
> 
> Before I take a look at that code, a quick question:  To get python
> code to respond to javascript code (and vice-versa), would anything
> need to be written in another language?  Or should python and
> javascript be enough? 

Yes, you can write a XPCOM component in python and that will be able to
be called from JS or C++.

In fact, Browse includes some XPCOM components implemented in python
that are being called by C++ in mozilla (see filepicker.py or
promptservice.py).


Tomeu




More information about the Library mailing list