how to add custom importer after the normal imports

Ian Kelly ian.g.kelly at gmail.com
Thu Oct 9 10:14:29 EDT 2014


On Oct 9, 2014 6:53 AM, "Gelonida N" <gelonida at gmail.com> wrote:
> I'm using Puthon 2.7 for the given project and there sys.meta_path is [].
>
> Just for fun I started Python3.3 and looked at it's meta_path, which
contained for example _frozen_importlib.PathFinder
>
> Unfortunately python 2.7 does not seem to have the package
_frozen_importlib
>
> So now the question seems to boil down to looking for the 2.7 equivalent
of python 3.3's _frozen_importlib.PathFinder

There is no equivalent. Prior to 3.3 that code was buried deeply in the
interpreter and not available to scripts. The reason for the change was to
expose more of the import machinery for exactly this kind of manipulation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20141009/790a14b7/attachment.html>


More information about the Python-list mailing list