ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> pyxpcom
pyxpcom
[pyxpcom] Accessing XBL elements from Python
by Rasjid Wilcox other posts by this author
Mar 29 2009 3:39AM messages near this date
view in the new Beta List Site
[pyxpcom] pyxpcom installation issues | Re: [pyxpcom] Accessing XBL elements from Python
Hi all,

I've done a first pass at creating a generic way of accessing XBL
elements from Python.  It uses an XPCOM component written in
Javascript and a Python library to proxy the elements.  I've only
tested it so far with the 'browser' element, but there is no element
specific code, so it should work quite generally.

I've got almost everything working as expected.  One can access all
the attributes, properties and methods of the element. I've even been
able to (in this case) pass a class instance implementing
WebProgressListener written in Python to the addProgressListener
method.  This is the only part (so far) that does not work reliably.
It will work for a short while, and then just stop responding.
Manually re-adding the listener causes it to work again.  So my
feeling is that somewhere something goes out of scope and gets garbage
collected.

In total it is currently about 200 lines of code.  I'm thinking of
re-writing it in an even more general manner, ideally to get full
access to the Javascript namespace.  But if anyone is interested in
looking at the code and making suggestions, I will put the code up
somewhere for people to look at.

Cheers,

Rasjid.
_______________________________________________
pyxpcom mailing list
pyxpcom@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Rasjid Wilcox
Rasjid Wilcox

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved