From: Niki S. <nik...@gm...> - 2021-02-02 10:00:19
|
On 1.02.21 г. 19:47, Will Deem wrote: > Good afternoon py2exe mailing list, > > I’ve had my first experience using py2exe today, but I appear to be hitting some snags with dynamic imports (I have gone through the wiki to no avail). > > The project uses a plugins folder containing subfolders with .py files: > > application.py > Plugins\ > | — __init__.py > | — Plugin1\ > | — — __run__.py > | — Plugin2\ > | — — __run__.py > > The project uses importlib.import_module to dynamically import the entry points in __run__.py like: > > Importlib.import_module(‘application.plugins.{}.__run__’.format(plugin)) > > It does not appear to be importing correctly this way, however. Is there a workaround that you know of? > You can make zip for each plugin and add these zip files to the sys.path HTH Niki |