discover contents of a namespace package
Brecht Machiels
brecht at mos6581.org
Tue Dec 24 06:57:47 EST 2013
Hello,
I'm trying to use namespace packages (as described by PEP 420) to manage optional components of my Python package.
I would like to discover which optional components are installed. Unfortunately, I have not found a straightforward way to do this. For regular packages, pkgutil.walk_packages() does this, but this doesn't work for namespace packages. Is there a way to discover the installed contents of a namespace package without manually reading the filesystem?
Is there a way to do this using namespace packages created using pkgutil or pkg_resources?
Thanks
--
Brecht Machiels
More information about the Python-list
mailing list