mozdev.org

pyxpcomext

resources:

 

The idea and parts of the pyshell code is based on the wonderful Javascript Shell.

Provides a shell like window that enables you to interact with the PyXPCOM Python interpreter and perform Python instructions. It provides tab completions through object inspection and has the ability to interact with the application through XPCOM. Check out the source.

PyShell in action, saying a hello from Python through the XPCOM nsIPromptService. The code for this:

promptSvc = components.classes["@mozilla.org/embedcomp/prompt-service;1"].\
        getService(Components.interfaces.nsIPromptService)
promptSvc.alert(None, 'Greeting...', "Hello from Python")

This is an extension that shows PyXPCOM working within Mozilla. It utilizes Python xpcom components, with XUL and JavaScript for the UI.

This shows off how you can use a Python UDP socket to communicate (send and receive) with a remote host. Check out the code.

This is an extension that shows PyDOM working within Mozilla. It utilizes Python working inside of XUL and the DOM (similar to JavaScript).

This shows off how you can use a Python UDP socket to communicate (send and receive) with a remote host. Check out the code.

For questions or comments about pyxpcomext, please send a message to the pyxpcomext mailing list.
Copyright © 2000-2008. All rights reserved. Terms of Use & Privacy Policy.