printable_filename = filename_or_null ? filename_or_null : "<None>";
handle = dlopen(filename_or_null,
RTLD_LAZY | (is_global?RTLD_GLOBAL:RTLD_LOCAL));
if (handle == NULL) {
PyErr_Format(PyExc_OSError, "cannot load library: %s",
printable_filename);
return NULL;
}
Instead the following might provide more information for debugging that also tells us what symbols were missing.