5 ms·
Before anyone gets too fired up about this, there are two major limitations: 1. Python code will only be executed from trusted sources (i.e., chrome loaded fro
by rcoder 18y ago
Before anyone gets too fired up about this, there are two major limitations:
1. Python code will only be executed from trusted sources (i.e., chrome loaded from the local filesystem). This means that you'll need to get users to download and install an extension to use your Python script code, rather than simply including it inline in a page on your server.
2. Because the extension bundles its own Python runtime, it has to be built and packaged separately for every architecture target. Right now, that means no 64-bit platforms, BSD, etc. -- so cross-platform compatibility is probably no better than Flash at the moment.
That being said, having yet another development language on the client for rich web applications is pretty cool. I can imagine all kinds of useful projects that could capitalize on Python's strong libraries. Hooking into native libraries using Python (either via the extension API or ctypes) is also a lot easier than writing an XPCOM wrapper.
- BrandonM 18y agoI don't really see this as being a boon for web developers, but for those who write or use Firefox extensions. That does include certain websites, but those are only the sites that are already utilizing a Firefox extension, anyways (e.g. del.icio.us, rememberthemilk). I would personally much rather hack up a Firefox extension in Python than to try to do it in Firefox's standard plugin architecture thingamajig (Javascript/CSS/voodoo/???). 2. Because the extension bundles its own Python runtime, it has to be built and packaged separately for every architecture target. Right now, that means no 64-bit platforms, BSD, etc. -- so cross-platform compatibility is probably no better than Flash at the moment. Just be sure we're clear, this comment describes the pyxpcomext extension itself, right? Surely more versions will be coming soon to any platforms supported by Python. If you are building an extension that utilizes this Python-Mozilla API, this is all transparent to you, and packaging separate builds is a non-issue.
- tuukkah 18y agoI would personally much rather hack up a Firefox extension in Python than to try to do it in Firefox's standard plugin architecture thingamajig (Javascript/CSS/voodoo/???). You'll still need to do "CSS/voodoo/???" to integrate your extension to the Firefox UI. What you get to do is to use Python instead of JavaScript (a matter of taste), and you get access to Python libraries, which cover desktop-side computing much better than JS.
- newt0311 18y agoThis is like ActiveX but managed and therefore with only 1% of the original brain deadness of the ActiveX design. Note: I would still be concerned about security with this. Even though python scripts can only be executed from trusted locations, quite a few web users have no idea what that is.