Berker Peksag added the comment:
It actually does work, you just have to embed the subdirectory in the
path you pass to zipimport.zipimporter():
Thanks, didn't know that. Would it be good to add an example to the
zipimporter.find_module() documentation?
--
Brett Cannon added the comment:
It certainly wouldn't hurt. I think all of the path-related things for that
module are under-documented in terms of subdirectories, relative directories,
etc.
--
___
Python tracker rep...@bugs.python.org
New submission from Berker Peksag:
I am trying to write a test for issue 8585. The
`zipimport.zipimporter.find_module()`
docs says:
Search for a module specified by fullname. fullname must be the fully qualified
(dotted) module name.
(from
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +brett.cannon, ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16497
___
___
Brett Cannon added the comment:
It actually does work, you just have to embed the subdirectory in the path you
pass to zipimport.zipimporter():
importer = zipimport.zipimporter('zipimport_example.zip/package/')
importer.find_module('package.eggs')
zipimporter object modules.zip/package/