Say I have this package layout<br><ul><li>\myPackage<br></li><ul><li>__init__.py</li><li>moduleA.py</li><li>moduleB.py</li></ul></ul>Is there a way (and I&#39;m sure there is...) to query, for a given package level, which modules live under it?<br>
I thought I could do it like so:<br><br><span style="font-family: courier new,monospace;">import myPackage</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">goodQualityInfo = dir(myPackage)</span><br>
<br>Thinking that he modules are just attributes of the package.  And while this prints some nice stuff, it has no knowledge of moduleA &amp; B.  I feel like missing\forgetting some fundamental command or something ;)<br>
<br>If you&#39;re wondering, I&#39;m authoring a tool that will take whatever modules are placed in the package (authored to a certain standard) and execute them based on a passed-in dataset to each.  But first I&#39;ve got to get that list of modules.  I&#39;ve thought of some hacky-ways in my head, but I&#39;d like to see if there is something a bit more elegant...<br>
<br>thanks!<br>