<br><br><div class="gmail_quote">On Fri, Nov 20, 2009 at 12:28 PM, Kent Johnson <span dir="ltr"><<a href="mailto:kent37@tds.net">kent37@tds.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Fri, Nov 20, 2009 at 3:05 PM, Dave Angel <<a href="mailto:davea@ieee.org">davea@ieee.org</a>> wrote:<br>
> Eric Pavey wrote:<br>
<br>
>> lol, in usual fashion, after I hack through it, while in the docs, I find<br>
>> the 'fancy' solution:<br>
>><br>
>> import pkgutil<br>
>> import myPackage<br>
>> modules = pkgutil.iter_modules(myPackage.__path__)<br>
>> for p in modules:<br>
>> print p[1]<br>
>><br>
>> moduleA<br>
>> moduleB<br>
<br>
> Thanks much for that. It's apparently in the code, but it's not in the<br>
> (Windows) help doc. Is that a doc bug?<br>
<br>
</div>Seems to be. The pkgutil docs are quite sparse:<br>
<a href="http://docs.python.org/library/pkgutil.html" target="_blank">http://docs.python.org/library/pkgutil.html</a><br>
<font color="#888888"><br>
Kent</font></blockquote><div><br>I'd seen a reference to that module online, looked in the docs, didn't
see much. But I imported it into my IDE anyway, which exposes all the methods and classes, and I realized it did a lot more than the docs said. So I
opened the module itself and poked around until I found iter_modules()
and after some trial and error got it workin'<br></div></div>