[Python-Dev] doc for new restricted execution design for Python

Trent Mick trentm at activestate.com
Wed Jun 28 19:41:02 CEST 2006

Brett Cannon wrote:
> The plan is to allow pure Python code to be embedded into web pages like 
> JavaScript. ...

> ...Then again, Mark Hammond has already done a bunch of work for pyXPCOM, so getting Python compiled right into Firefox itself shouldn't be too bad.
> If this really takes off, will probably want both: get into Firefox, but have an extension for pre-existing installations.

You should really speak with Mark, if you haven't recently. He's gotten 
a lot further than just PyXPCOM. My understanding (I might be a bit off 
on the branches and timing) is that his "DOM_AGNOSTIC" work on the 
Mozilla code has mostly been checked into the trunk. This work is to do 
mostly what you are describing: Python as a client-side scripting 
language along-side JavaScript.

I can't recall what Mozilla's distribution plans are for this. Certainly 
it wouldn't be before Firefox 3. Then again, default Firefox builds 
would like not include Python by default.

It sounds to me that a restricted-execution/security-model story for 
Python would be important here.

Mark (and me a little bit) has been sketching out creating a "Python for 
Mozilla/Firefox" extension for installing an embedded Python into an 
existing Firefox installation on the pyxpcom list:


> The idea is that there be a separate Python interpreter per web browser page instance. 

I think there may be scaling issues there. JavaScript isn't doing that 
is it, do you know? As well, that doesn't seem like it would translate 
well to sharing execution between separate chrome windows in a 
non-browser XUL/Mozilla-based app.


Trent Mick
trentm at activestate.com

More information about the Python-Dev mailing list