[Distutils] PEP 420 on python2

Nick Coghlan ncoghlan at gmail.com
Fri Jul 14 08:19:51 EDT 2017


On 14 July 2017 at 12:12, Asmodehn Shade <asmodehn at gmail.com> wrote:
> Hi everyone,
>
> I m very new around here, I just wanted to let you know that while writing a
> custom importer for py2 and py3, I ended up backporting some python3
> libimport code to python2.
>
> The code is over there : https://github.com/asmodehn/filefinder2
> This way I now support importing packages without __init__.py in python2.
> It was simpler for my usecase than using pkg_resources or pkgutil.

Nice!

While it's more intrusive (since it essentially replaces the entire
Python 2 import system with the Python 3 one), you may also find
https://pypi.python.org/pypi/importlib2 of interest.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Distutils-SIG mailing list