forwarded 409049 https://bugzilla.mozilla.org/show_bug.cgi?id=340789 thanks
On Tue, Jan 30, 2007 at 03:25:23PM +0100, W. Borgert <[EMAIL PROTECTED]> wrote: > Package: python-xpcom > Version: 1.8.0.8-1 > > Unfortunately, there is no documentation in the package, > but I suppose that this behaviour is not correct: > > $ python > Python 2.4.4 (#2, Jan 13 2007, 17:50:26) > [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import xpcom > >>> import xpcom.components > Traceback (most recent call last): > File "<stdin>", line 1, in ? > File "/var/lib/python-support/python2.4/xpcom/components.py", line 39, in ? > import xpt > File "/var/lib/python-support/python2.4/xpcom/xpt.py", line 72, in ? > import xpcom._xpcom > File "/var/lib/python-support/python2.4/xpcom/server/__init__.py", line 40, > in > ? > from policy import DefaultPolicy > File "/var/lib/python-support/python2.4/xpcom/server/policy.py", line 38, > in ? > from xpcom import xpcom_consts, _xpcom, client, nsError, ServerException, > COMException > File "/var/lib/python-support/python2.4/xpcom/client/__init__.py", line 40, > in > ? > from xpcom import xpt, COMException, nsError > ImportError: cannot import name xpt > >>> > > Btw. "from xpcom import components" throws the same > exception, on both i386 and amd64. This is due to autoregistration of the libpyloader component that is not possible from python. See upstream bug #340789 I filed (and forgot in the meanwhile). The workaround is to import xpcom._xpcom first. Mike -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]