PyXPCOM allows for communication between Python and XPCOM, such that a Python application can access XPCOM objects, and XPCOM can access any Python class that implements an XPCOM interface. PyXPCOM is actively used in ActiveState Komodo products, for example.

With PyXPCOM, a developer can talk to XPCOM or embed Gecko from a Python application. PyXPCOM is similar to JavaXPCOM (Java-XPCOM bridge) or XPConnect (JavaScript-XPCOM bridge).

Mozilla defines many external interfaces available to embeddors and component developers. PyXPCOM provides access to these interfaces as Python interfaces. PyXPCOM also contains several classes that provide access to functions for initializing and shutting down XPCOM and Gecko from Python, as well as some XPCOM helper functions.

Documentation

Building PyXPCOM
The instructions for building PyXPCOM.
Creating a Python XPCOM component
An example of how to create a simple XPCOM component with Python.
Getting to know PyXPCOM
PyXPCOM is a bridging technology between XPCOM and Python. This article gives you a head start to PyXPCOM.

NOTE: The links to Part II and III of this series are broken and I cannot find them on the IBM site. Please update this page if/when the links can be found.

View All...

History

PyXPCOM was initially developed by ActiveState Tool Corporation, and came out of their Komodo project. Current releases are now integrated with the Mozilla build system.

Other Resources
PythonExt - extension that provides PyXPCOM
Samples - demo applications using PyXPCOM

Community


Source Code

XPCOM
PyDOM: replace JavaScript with Python
Python-SpiderMonkey