Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #62674 > unrolled thread

discover contents of a namespace package

Started byBrecht Machiels <brecht@mos6581.org>
First post2013-12-24 12:57 +0100
Last post2013-12-24 12:57 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  discover contents of a namespace package Brecht Machiels <brecht@mos6581.org> - 2013-12-24 12:57 +0100

#62674 — discover contents of a namespace package

FromBrecht Machiels <brecht@mos6581.org>
Date2013-12-24 12:57 +0100
Subjectdiscover contents of a namespace package
Message-ID<mailman.4587.1387886261.18130.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web