[Tutor] Querying a packages modules?
Dave Angel
davea at ieee.org
Fri Nov 20 21:05:01 CET 2009
Eric Pavey wrote:
> On Fri, Nov 20, 2009 at 11:14 AM, Eric Pavey <warpcat at gmail.com> wrote:
>
>
>> On Fri, Nov 20, 2009 at 10:58 AM, Eric Pavey <warpcat at gmail.com> wrote:
>>
>>
>>> On Fri, Nov 20, 2009 at 10:40 AM, Dave Angel <davea at ieee.org> wrote:
>>>
>>>
>>> <snip>
> lol, in usual fashion, after I hack through it, while in the docs, I find
> the 'fancy' solution:
>
> import pkgutil
> import myPackage
> modules = pkgutil.iter_modules(myPackage.__path__)
> for p in modules:
> print p[1]
>
> moduleA
> moduleB
>
>
Thanks much for that. It's apparently in the code, but it's not in the
(Windows) help doc. Is that a doc bug?
DaveA
More information about the Tutor
mailing list