List of modules available for import inside Python?

Fredrik Lundh fredrik at pythonware.com
Wed Sep 10 14:43:17 CEST 2008


Michele Simionato wrote:

> I have just tried the following on my Ubuntu box with the system
> Python:
> 
> ~$ python /usr/lib/python2.5/doc/tools/listmodules.py
> /usr/lib/python2.5/doc/tools/listmodules.py:99: DeprecationWarning:
> the rgbimg module is deprecated
>   __import__(m)
> 
> ** (process:24863): WARNING **: AT_SPI_REGISTRY was not started at
> session startup.
> 
> ** (process:24863): WARNING **: Could not locate registry
> location: /usr/lib/xulrunner-1.9.0.1/libxpcom.so
> before 3
> /usr/lib/python2.5/doc/tools/listmodules.py:99: Warning: cannot
> register existing type `GtkSourceStyleScheme'
>   __import__(m)
> /usr/lib/python2.5/doc/tools/listmodules.py:99: Warning:
> g_type_set_qdata: assertion `node != NULL' failed
>   __import__(m)
> /usr/lib/python2.5/doc/tools/listmodules.py:99: Warning: cannot
> register existing type `GtkSourceBuffer'
>   __import__(m)
> /usr/lib/python2.5/doc/tools/listmodules.py:99: Warning:
> g_type_get_qdata: assertion `node != NULL' failed
>   __import__(m)
> Segmentation fault
> 
> Interesting, isn't it?

it does indeed import modules found in the path if they appear to be 
Python C extensions.  why Ubuntu puts badly written C modules in their 
default Python path is more than I can tell...

</F>




More information about the Python-list mailing list