[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
|