> I'm asking specifically because I'd like to properly implement __file__ > in Cython modules at module init time.
Why do you need to implement __file__? Python will set it eventually to its correct value, no? > Another problem is that package local imports from __init__.py no longer > work when it's compiled Does it actually work to have __init__ be an extension module? > Any ideas how this could currently be achieved? Currently, for Cython? I don't think that can work. > Or could this become a new feature in the future? Certainly. An approach similar to _Py_PackageContext should be possible. Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com