Subj : Re: Equivalent of JS_InitClass for global object? To : netscape.public.mozilla.jseng From : Brendan Eich Date : Sun Aug 24 2003 07:58 pm Brendan Eich wrote: > David Bradley wrote: > >> John J. Lee wrote: >> >>> I've written a Javascript/Python bridge. I can implement Javascript >>> objects in Python, except for one case: I can't implement the JS >>> global object in Python (in particular, I want to implement the >>> "window" object found in web browsers' object models). >> >> >> Have you looked a PyConnect? The code may be in a bit of disarray, >> not sure how well maintained it is, but it might be an easier task to >> get it in order than reinvent it: >> http://lxr.mozilla.org/mozilla/source/extensions/python/xpcom/ > > > Mark Hammond has updaged it recently. I think it works. Bcc'ing Mark, now that I have his address (not cc'ing, in case he wants to avoid the fame, or the spam). The advantage of PyConnect is that if you go down the JS/Python route, you're inviting n^2 inter-language-runtime bridge-building. If you instead choose to build only XPCOM/language bridges, you need n for n languages. Plus XPCOM, of course. /be .