Re: List of modules available for import inside Python?
Michele Simionato wrote:
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>
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: DeprecationWarn ing:
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 `GtkSourceStyle Scheme'
__import__(m)
/usr/lib/python2.5/doc/tools/listmodules.py: 99: Warning:
g_type_set_qdat a: assertion `node != NULL' failed
__import__(m)
/usr/lib/python2.5/doc/tools/listmodules.py: 99: Warning: cannot
register existing type `GtkSourceBuffe r'
__import__(m)
/usr/lib/python2.5/doc/tools/listmodules.py: 99: Warning:
g_type_get_qdat a: assertion `node != NULL' failed
__import__(m)
Segmentation fault
>
Interesting, isn't it?
Python:
>
~$ python /usr/lib/python2.5/doc/tools/listmodules.py
/usr/lib/python2.5/doc/tools/listmodules.py: 99: DeprecationWarn ing:
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 `GtkSourceStyle Scheme'
__import__(m)
/usr/lib/python2.5/doc/tools/listmodules.py: 99: Warning:
g_type_set_qdat a: assertion `node != NULL' failed
__import__(m)
/usr/lib/python2.5/doc/tools/listmodules.py: 99: Warning: cannot
register existing type `GtkSourceBuffe r'
__import__(m)
/usr/lib/python2.5/doc/tools/listmodules.py: 99: Warning:
g_type_get_qdat a: assertion `node != NULL' failed
__import__(m)
Segmentation fault
>
Interesting, isn't it?
Python C extensions. why Ubuntu puts badly written C modules in their
default Python path is more than I can tell...
</F>
Comment