How do I let PyImport_ImportModule work like the normal python import?

Maas-Maarten Zeeman maas at wanadoo.nl
Wed Sep 29 16:21:40 EDT 1999


Hello,

I have a problem with the PyImport_ImportModule call. What I want to do is
create two c-extension. One extension uses PyImport_ImportModule to import the
other. This all works great. 

Now when I place the two extension in a seperate directory and create an
__init__.py for the directory and try to use import the c-extension will not be
able to find the other. I suspected this to work like the nornal import, but
this was not the case.

Another thing I tried was PyImport_Import which uses the "import hook function",
but this also didn't solve the problem.

Does someone know how get the normal import behavoir inside a c-extension?








More information about the Python-list mailing list