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

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to