discover contents of a namespace package

B

Brecht Machiels

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top