JS-Python Communication using PyXPCom
tomeu at tomeuvizoso.net
Sun Mar 23 06:03:32 EDT 2008
thought I already had suggested this a long time ago, but anyway:
- Create a XPCOM service in JS that exposes the spreadsheet
functionality implemented in JS.
- Create another XPCOM service in python that exposes the needed Sugar
Shouldn't this allow you to integrate SocialCalc in any way you wish?
Creating these two components shouldn't be too hard. Please feel free
to ask in this mailing list any doubts you have.
Example of JS service:
2008/3/22 Manusheel Gupta <manu at laptop.org>:
> Manusheel Gupta
> Technical Consultant and Adviser
> One Laptop Per Child Inc.
> ---------- Forwarded message ----------
> From: Luke Closs <lukecloss at gmail.com>
> Date: Fri, Mar 21, 2008 at 1:27 AM
> Subject: Re: hello
> To: Joshua McKenty <jmckenty at gmail.com>, manu at laptop.org
> On Thu, Mar 20, 2008 at 10:27 AM, Joshua McKenty <jmckenty at gmail.com> wrote:
> > Luke,
> > Good to hear from you. (I thought it was OLPC laptop, though).
> > What questions have you got?
> > Joshua
> Hey Joshua,
> I've cc'd Manu Gupta, who is collaborating with me on this OLPC spreadsheet
> (OLPC is the non-profit organization, XO is the laptop)
> So I'm kinda at a standstill on this project b/c I'm not sure how to
> proceed technically - so I'm hoping you can help here, based on the
> discussion we had at Northern Voice.
> As I mentioned in person, I've got events going back and forth between
> interactions I need to do, except one. (I'm not tied to the EventObserver,
> but it seems to get the job done - I'd consider using another mechanism
> too). The one thing where events will not work is when we need to save the
> spreadsheet. For instance, the user may quit the program, in which case my
> python method write_file() will be called, and I need to (synchronously)
> back, so I can write it to disk. I don't think an event passing model
> (asynch) would work in this case.
> python code could call, but this seems to require additional steps for
> compiling that interface, and I'm not sure how I would end up packaging
> those into the sugar app.
> So basically, I need your help to figure out how my python code can make a
> Devel mailing list
> Devel at lists.laptop.org
More information about the Devel