pyxpcomext

pyxpcomext

resources:
Python extension

About the Python Extension (pythonext)

This project provides Python Mozilla bindings that enables Python to be used inside of Mozilla applications. The Python bindings are wrapped up in an extension (XPI file) so that users can easily install PythonExt just like any other Mozilla/Firefox extension. The Python bindings are a combination of PyXPCOM and PyDOM.

Update: Project has moved to PythonExt in Google code.

The Python extension is using Python 2.5.2 and is available to be used in most Mozilla based applications, including Firefox, Thunderbird and XulRunner.

Why do this?

  • It gives the power of Python to Mozilla extension developers
  • Easy to setup multi-threaded tasks
  • Rapidly build cross platform extensions, no compilation issues!
  • Great base of core library functionality
  • Not limited to JavaScript
  • Provides a Python GUI toolkit to build applications (XULRunner)

What does Python bring to Mozilla?

  • ctypes support, easily accessing the native OS libraries
  • additional network protocol support, like SFTP, SSH access through Paramiko
  • create UDP sockets (see Mozilla bug 191187)
  • thousands of additional python packages

What are the limitations

  • The extension is large, between 5-15MB
  • PythonExt uses a separate extension (xpi file) for every operating system supported

What's inside the extension?

  • The Python 2.5.2 interpreter, libraries and necessary files
  • The bindings to enable Python to communicate with Mozilla XPCOM and DOM

How does it all work?

  • The Python extension is download and installed into a Mozilla application as a regular extension
  • Upon starting of the application, the extension is registered, and loads the internal dynamic linked libraries (python, pyxpcom and pydom)
  • Additional extension directories are then checked to see if there are any extensions using pyxpcom that need to be registered (and appropriately registers them)
  • The internal Python path (sys.path) is updated to reflect any "pylib" directories found in the installed extensions

Still TODO:

  • Include the Python DOM component in the Mozilla 1.9 builds
  • Provide additional samples and more documentation...
  • Finish the paramiko SFTP channel
  • Other builds (64-bit, Linux libcpp6, etc...)
  • Create a python library to facilitate in the creation of new XULRunner/Python application skeletons (possibly a Komodo project extension as well)
  • Work out a system to easily support platform dependant binary python modules (add a specific platform directory to the PYTHONPATH automatically?)

Additional references

The pyxpcomext project can be contacted through the mailing list or the member list.
Copyright © 2000-2012. All rights reserved. Terms of Use & Privacy Policy.   

posted on 2012-02-05 09:00  lexus 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/lexus/archive/2012/02/05/2338753.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值