[Cython] 0.9.8.1.1 and .pxd files
Stefan Behnel
stefan_ml at behnel.de
Fri Oct 31 08:46:03 CET 2008
Lisandro Dalcin wrote:
> Python recognizes a PKGNAME directory as a pakage if '__init__.py' is
> there, if not, no way. BUT if '__init__.so' is also there, it loads
> '__init__.so' !!! But then the exported module init function in the
> dynlib needs to be named initPKGNAME, and "PKGNAME" needs to be passed
> to Py_InitModule()
>
> PS: tried only in Py 2.5, this is surely undocumented, and probably it
> is in fact some bugy code in CPython's 'import.c' .
What makes you think that this is different from the normal behaviour of
loading binary modules before loading Python modules?
I think there's a difference between "recognising a package as such when
finding an __init__.py" and "loading the package module". The latter
should use the normal module loading machinery for loading the module
"PKGNAME.__init__" (note the missing .py).
Stefan
More information about the Cython-dev
mailing list