A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-December/075729.html below:

[Python-Dev] Improved dyn mod load debug

[Python-Dev] Improved dyn mod load debugChristian Heimes lists at cheimes.de
Mon Dec 17 13:50:07 CET 2007
Neal Becker wrote:
> 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
> lib).
> 
> Currently, the only debug info is from importdl.c:
>         m = PyDict_GetItemString(PyImport_GetModuleDict(), name);
>         if (m == NULL) {
>                 PyErr_SetString(PyExc_SystemError,
>                                 "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:

How do you like:

        if (p == NULL) {
                PyErr_Format(PyExc_ImportError,
                   "dynamic module '%.400s' does not define init
function (init%.200s)",
                             pathname, shortname);
                return NULL;
        }

        m = PyDict_GetItemString(PyImport_GetModuleDict(), name);
        if (m == NULL) {
                PyErr_Format(PyExc_SystemError,
                                "dynamic module '%.400s' not initialized
properly",
			     pathname);
                return NULL;
        }

Christian
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4