On Friday 12 September 2008, you wrote: > On Fri, Sep 12, 2008 at 8:42 PM, Tim Johnson <[EMAIL PROTECTED]> wrote: > > If I execute the following code: > > > > imported = sys.modules.keys() > > > > print imported > > > > Do I indeed get a list of _all_ modules imported by this module? > > You get a list of all modules that have been imported at any time by > the running program, not necessarily just in the current module. > > > If so, then could anyone offer suggestion on how to "parse" the > > > > non-standard modules from this list. I.E. modules _not_ included in > > > > the standard python distribution. > > sys.modules is a dict mapping names to the actual modules. Most > modules have a __file__ attribute that is the path to the file > containing the module. Perhaps you could filter out the modules that > are in the standard library path and see what is left. Thanks Kent. And there is also the Global Module Index at http://docs.python.org/modindex.html. I could convert that to a data structure to use as the control. cheers tim
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor