On Monday 02 April 2007 16:33, Robert Kern wrote:
help(pkgutil.iter_modules)
Help on function iter_modules in module pkgutil:
iter_modules(path=None, prefix='')
Yields (module_loader, name, ispkg) for all submodules on path,
or, if path is None, all top-level modules on sys.path.
On Thursday 29 March 2007 17:58, Alex Martelli wrote:
Sure, pydoc (which help calls under the code) does that, with a nice mix
of inspect, os, and pkgutil.iter_modules calls. pkgutil.iter_modules
may in fact be most of what you need:
help(pkgutil.iter_modules)
Help on function iter_modules
Joshua J. Kugler wrote:
On Thursday 29 March 2007 17:58, Alex Martelli wrote:
Sure, pydoc (which help calls under the code) does that, with a nice mix
of inspect, os, and pkgutil.iter_modules calls. pkgutil.iter_modules
may in fact be most of what you need:
help(pkgutil.iter_modules)
Help
Joshua J. Kugler [EMAIL PROTECTED] wrote:
still be nicely portable. It just seems that since Python is gathering
that information anyway, it should make it available without me having to
walk the directory tree.
Sorry, where is Python gathering that information anyway? Unless I'm
mistaken,
On Thursday 29 March 2007 07:33, Alex Martelli wrote:
Joshua J. Kugler [EMAIL PROTECTED] wrote:
still be nicely portable. It just seems that since Python is gathering
that information anyway, it should make it available without me having to
walk the directory tree.
Sorry, where is
Joshua J. Kugler [EMAIL PROTECTED] wrote:
On Thursday 29 March 2007 07:33, Alex Martelli wrote:
Joshua J. Kugler [EMAIL PROTECTED] wrote:
still be nicely portable. It just seems that since Python is gathering
that information anyway, it should make it available without me having to
[If this is documented somewhere, please just point me there. I googled on
the terms that made sense to me, and didn't find anything.]
So, I have:
ModTest
__init__.py
AModule.py
BModule.py
CModule.py
All works fine. However, when I import ModTest, I would like
On Mar 28, 2:44 pm, Joshua J. Kugler [EMAIL PROTECTED] wrote:
[If this is documented somewhere, please just point me there. I googled on
the terms that made sense to me, and didn't find anything.]
So, I have:
ModTest
__init__.py
AModule.py
BModule.py
On Wednesday 28 March 2007 12:04, [EMAIL PROTECTED] wrote:
All works fine. However, when I import ModTest, I would like it to
discover and store the names of the modules beneath it, and construct a
list, say mod_list, that I can access later to find the names of the
sub-modules in
this