[Pyrex] Pyrex importing question.
Phillip J. Eby
pje at telecommunity.com
Sat Nov 13 01:45:17 CET 2004
At 02:07 PM 11/12/04 -0500, Blake Winton wrote:
>And that's all. This leads me to believe that the
>"import conduit.ConduitImpl" line is failing, but I don't know of any
>particularly good way to find out how or why. Looking at the generated .c
>file, the line that seems to fail is:
>__pyx_3 = __Pyx_Import(__pyx_k4p, 0); if (!__pyx_3) {__pyx_filename =
>__pyx_f[0]; __pyx_lineno = 4; goto __pyx_L1;}
>and the first line of __Pyx_Import is:
>__import__ = PyObject_GetAttrString(__pyx_b, "__import__");
>
>There's a thread at:
>http://groups.google.com/groups?hl=en&lr=&threadm=mailman.1028062003.32422.python-list%40python.org&rnum=1&prev=/groups%3Fq%3Dpyrex%2Bpy2exe%2Bimport%26hl%3Den%26btnG%3DGoogle%2BSearch
>which looks like it offers a solution to a problem which might be similar
>to mine, specifically it suggests that Pyrex should use
>PyImport_ImportModuleEx() instead of __import__. But this advice was
>offered back in 2002. So, has anyone done anything about it? Was it
>decided to be a bad idea for some reason, or did it just slip through the
>cracks?
I think the above thread is a red herring: the symptoms you are having are
different, and as far as I can tell the necessary changes to fix *that*
problem were already done in Pyrex.
I would suggest that you put a try/except block around the import, and log
any exception that occurs.
More information about the Pyrex
mailing list