[Python-Dev] Improved dyn mod load debug

Neal Becker ndbecker2 at gmail.com
Mon Dec 17 13:02:54 CET 2007

I had mistakenly installed a module (Qsci.so) into the wrong directory. 
Debugging this was harder than it needed to be (c-level debug of shared

Currently, the only debug info is from importdl.c:
        m = PyDict_GetItemString(PyImport_GetModuleDict(), name);
        if (m == NULL) {
                                "dynamic module not initialized properly");
                return NULL;

I wonder if it would be difficult to print out the name expected, and the
name actually loaded?  In this case, it would have said:

expected: PyQt4/Qsci
loaded: Qsci

More information about the Python-Dev mailing list