memimport for Python 3
memimport
is a part of py2exe
, which helps import Python extensions from
memory, e.g. extensions from Zip files or Web.
This repo via CI to build it as Python extensions, beacause the original has
been built into the py2exe runstubs, only run with script, no REPL.
Development of memimport
is hosted here: https://github.com/SeaHOH/memimport.
Development of py2exe
is hosted here: https://github.com/py2exe/py2exe.
Installation
pip install memimport
Usage
import zipextimporter
import sys
sys.path.insert(0, 'path/to/libs.zip')
then
zipextimporter.install()
or
zipextimporter.install(hook=False)
or
zipextimporter.install(hook=True)
then
import ext_mod_in_zip
ext_mod_in_zip
ext_mod_in_zip.__file__
ext_mod_in_zip.__loader__
import py_mod_in_zip
py_mod_in_zip
py_mod_in_zip.__file__
py_mod_in_zip.__loader__
More usage see source or use help function.